31 lines
392 B
Python
Executable File
31 lines
392 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from pwn import *
|
|
|
|
exe = ELF("./format-string-1_patched")
|
|
|
|
context.binary = exe
|
|
|
|
|
|
def conn():
|
|
if args.LOCAL:
|
|
r = process([exe.path])
|
|
if args.DEBUG:
|
|
gdb.attach(r)
|
|
else:
|
|
r = remote("addr", 1337)
|
|
|
|
return r
|
|
|
|
|
|
def main():
|
|
r = conn()
|
|
|
|
# good luck pwning :)
|
|
|
|
r.interactive()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|