no hex response from server in python -


#!/usr/bin/env python  import socket import struct import time import binascii  host = '127.0.0.1'          # local machine name port = 5000                # reserve port service. print 'connecting ', host, port  s = socket.socket(socket.af_inet, socket.sock_stream) s.connect((host, port)) message = 'ea68df0102a100df0360433a5c554c205465737420546f6f6c735c42545420352e322e315c4170706c69636174696f6e5c5375697465735c496d616765735c566973615c436f6e746163745c414456542076362e312e315c54657374436172643031202d20412e786d6c' s.sendall(message) data = binascii.hexlify(message).decode() print "sent message:", data data = s.recv(4096)  data = binascii.hexlify(data).decode() print "received message:", data s.close() 

'received message' should in hex form blank as:

received message:  


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -