I'd like to convert HEX output in python to ASCII when i'm using LiveCapture from pyshark.
My code:
capture = pyshark.LiveCapture(interface='en1',
bpf_filter='tcp port 5555 and len > 66',)
colored.OK("Interface bindée sur %s" % socket.gethostbyname(socket.gethostname()))
for packet in capture.sniff_continuously():
if packet.ip.src == socket.gethostbyname(socket.gethostname()):
colored.OK("Send packets")
else:
colored.OK("Receive packets")
print(''.join(packet.data.data.split(":")))
print("")
Output for receive packets:
66787874798582124495051
I'd like to convert this output to ASCII char directly in the python output Is it possible?
Thanks