Я знаю он ужасен=)
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('71.236.123.168',27977))
s.sendall('0x05'+'1'+'1')
result = s.recv(50000)
print result
s.close()
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('71.236.123.168',27977))
s.sendall('0x05'+'1'+'1')
result = s.recv(50000)
print result
s.close()
data = struct.pack('>BBB',0x05, 1,1)
s.send(data)
s.recv(1024)
>>>'\x05\x00'