Skip to content

Instantly share code, notes, and snippets.

@integeruser
integeruser / wrapper.py
Last active July 6, 2019 16:00 — forked from xire-/wrapper_template.py
Normalize environment when running a program with and without GDB
#!/usr/bin/python2
def exploit():
payload = '\xde\xad\xbe\xef'
return payload
# Usage: in gdb, execute `set exec-wrapper ./wrapper.py`
# Set arguments and environment variables for the program
# arg0 (real path of the executable to run) is set automatically
args = ['arg1', exploit(), 'arg3']