Created
August 22, 2022 20:28
-
-
Save danielpyon/61f9d7f45d664328b437162de3d484b9 to your computer and use it in GitHub Desktop.
pwn template
This file contains 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 struct | |
def p64(x): | |
return struct.pack('Q', x) | |
def u64(x): | |
return struct.unpack('Q', x)[0] | |
def p32(x): | |
return struct.pack('<I', x) | |
def u32(x): | |
return struct.unpack('<I', x)[0] | |
if __name__ == '__main__': | |
local, debug = True, True | |
if local: | |
p = process('./chall') | |
gdb.attach(p, ''' | |
set follow-fork-mode child | |
break *main | |
continue | |
''') | |
else: | |
p = remote('chall.org', 1234) | |
# print(p.recvuntil(b':')) | |
# p.sendline() | |
p.interactive() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment