print('Listening on {} {}'.format(ip,porta))
(obj, cliente) = server.accept()
print('connect received from {}'.format(cliente[0]))
while (True):
msg = obj.recv(1024)
**system('rev')**
server.close()
print('Listening on {} {}'.format(ip,porta))
(obj, cliente) = server.accept()
print('connect received from {}'.format(cliente[0]))
while (True):
msg = obj.recv(1024)
**system('rev')**
server.close()
Use the command rev
with |
of bash:
echo 12345|rev
Return:
54321
That is: **system('{comando que retorna string}|rev')**