1

print(scapy_packet[scapy.Raw].load) gives hex string. How to convert into readable string?

Rebecca
  • 23
  • 5
  • No, that’s not a hex string. It’s the representation of the bytes value, see [What does a b prefix before a python string mean?](https://stackoverflow.com/q/2592764) – Martijn Pieters Feb 18 '20 at 01:12

1 Answers1

0

You can use below code.

print(bytearray.fromhex(scapy_packet[scapy.Raw].load).decode())
Anupam Chaplot
  • 1,134
  • 1
  • 9
  • 22