Format String 1
This commit is contained in:
30
format_string_1/sol.py
Executable file
30
format_string_1/sol.py
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/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()
|
||||
Reference in New Issue
Block a user