Advertisement
foryou97

pwntools

Oct 4th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. from pwn import *
  2.  
  3. host = "0.0.0.0"
  4. port = 1111
  5. bfsize = 1024
  6.  
  7. conn = remote(host, port)
  8. data = conn.recvuntil("(no whitespace): ")
  9. print "data1", data
  10. conn.sendline("A"*16)
  11. data = conn.recv(bfsize)
  12. print "data2", data
  13.  
  14. id1 = data.find("Your Cookie is: ")
  15. id2 = data.find("\nEnter")
  16. print "cookie:", data[id1+16:id2]
  17.  
  18. # conn.interactive()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement