Advertisement
chaosagent

sCTF Deceptive Ports client

Feb 27th, 2015
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import time,random, socket
  4.  
  5. conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  #defines the socket
  6. conn.connect(('python.sctf.io', 25565))
  7. x = conn.recv(4096).strip()
  8. print x
  9. conn.send('I am Boss')
  10. x = conn.recv(4096).strip()
  11. print x
  12. conn.send('')
  13. x = conn.recv(4096).strip()
  14. print x
  15. while True:
  16.         tosend = raw_input().strip()
  17.         while tosend == '':
  18.                 tosend = raw_input().strip()
  19.         conn.send(tosend)
  20.         x = conn.recv(4096).strip()
  21.         print x
  22.         if x != 'Please do a valid action!':
  23.                 x = conn.recv(4096).strip()
  24.                 print x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement