Guest User

Untitled

a guest
Aug 5th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import socket
  2.  
  3. connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  4.  
  5. HOST = ''
  6. PORT = 10024
  7. LOGIN = "scar"
  8. PASSW = "scar"
  9.  
  10. connection.bind((HOST, PORT))
  11. connection.listen(5)
  12.  
  13. while 1:
  14. server, client = connection.accept()
  15. print "Connection from: ", client
  16.  
  17. server.send("Welcome to SCX64 Protocol v0.3b!\nlogin: ")
  18. username = server.recv(3)
  19. server.send("password: ")
  20. password = server.recv(3)
  21. if username == LOGIN:
  22. server.send("Congratulations!")
  23.  
  24. server.close()
Add Comment
Please, Sign In to add comment