mirror of
https://github.com/danielepintore/dotfiles.git
synced 2026-06-15 20:25:13 +02:00
Added pwninit template
This commit is contained in:
31
.config/pwninit/pwninit-template.py
Normal file
31
.config/pwninit/pwninit-template.py
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from pwn import *
|
||||
|
||||
{bindings}
|
||||
|
||||
context.binary = {bin_name}
|
||||
# context.terminal = ['tmux', 'splitw', '-h']
|
||||
|
||||
def conn():
|
||||
if args.LOCAL:
|
||||
r = process({proc_args})
|
||||
elif args.GDB:
|
||||
r = gdb.debug({proc_args}, """
|
||||
""")
|
||||
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