This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| from pwn import * | |
| import os | |
| os.environ["PWNLIB_NOTERM"] = "1" | |
| def send_file(src, dst): | |
| data = b64e(read(src)) | |
| p.sendlineafter("$", "stty -echo") | |
| p.sendlineafter("$", f"base64 -d <<EOF > {dst}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Calc | |
| ( Expr(..) | |
| , parse | |
| , calculate | |
| ) where | |
| import Control.Applicative | |
| import Parser | |
| data Expr = Add Expr Expr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pwn import * | |
| BINARY = '<path_to_binary>' | |
| IP, PORT = '<ip>', 8080 | |
| LOCAL = True | |
| if LOCAL: | |
| p = process(BINARY) # Makes pipe fd |