Files
ctf/2025/catthegrey/pwn/dist-infinite_connect_four/solve.py

33 lines
457 B
Python
Executable File

#!/usr/bin/env python3
from pwn import *
exe = ELF("./infinite_connect_four_patched")
libc = ELF("./libc.so.6")
ld = ELF("./ld-linux-x86-64.so.2")
context.binary = exe
def conn():
if args.LOCAL:
r = process([exe.path])
if args.GDB:
gdb.attach(r)
else:
r = remote("addr", 1337)
return r
def main():
r = conn()
# good luck pwning :)
r.interactive()
if __name__ == "__main__":
main()