title: Use socket to send username and password to tcp server
body: <p>I need to send a username , password and message to a tcp server to get an output that I need for a code challenge that i'm working on. I have been given this set of instructions:</p>
  
  <pre><code>Connect to alien server ('localhost', 10000),
  Then send USER followed by aliensignal,
  Then send PASS followed by unlockserver,
  Next SEND followed by moonbase.
  Then send END and if all followed key will provided.
  </code></pre>
  
  <p>I have written a python code that does exactly what it says:</p>
  
  <pre><code>import socket
  
  clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  clientsocket.connect(('localhost', 10000))
  clientsocket.send('USER: aliensignal')
  
  clientsocket.send('PASS: unlockserver')
  clientsocket.send('SEND: moonbase')
  clientsocket.send('END')
  data = clientsocket.recv(4096)
  print(data)
  </code></pre>
  
  <p>But i get an output that says:</p>
  
  <pre><code>############# DARKSTORE KEY SERVER SPEC ############################
  
  Set username then password. Once set send name then end connection
  
  and you access key will be sent.
  
  
  USER: Tell server you will be sending username
  
  PASS: Tell server you will be sending password
  
  SEND: Tell server you will be sending data. (Must be authenticated)
  
  END: Tell server to end transaction. 
  
  ######################################################
  </code></pre>
  
  <p>It gives me this output whether or not I send the username and password.
  Does anyone know why this is happening?</p>