#!usr/bin/python
import socket
import commands
Host = 'localhost'
Port = 9944
s = socket.socket(socket.AF_INET, socket.SOCKET_STREAM)
s.bind(Host, Port)
s.listen(1)
while 1:
connet,addr = s.accept()
while 1:
data = conn.recv(1024)
cmd_status,cmd_result = commands.getstatusouput(data)
conn.close()