x = os.system("ls")
sock.send(x)
TypeError: send() argument 1 must be string or read-only buffer, not int
f = file("/tmp/cmd", "w")
f.write(str("ls"))
f.close()
os.popen("bash /tmp/cmd > /tmp/out")
f = file("/tmp/out", "r")
outbuff = f.read()
sock.send(outbuff)