I am working on sending bytes to a USB device from a Python application. An example payload looks as follows:
a = bytearray(b'\x00\xb4nn\x00\x00\x00\x00\x00')
What I am curious about is the nn part, following \xb4nn - the string, in the current form, cannot be converted to either UTF-8 or ASCII. In some payload cases, that string can also be \xb4n, which seems like an odd way to present HEX information.
What is nn in a byte string?
nnpart represents?\x6ebytes. Bytes that correspond to regular ascii characters are displayed as those characters in a bytestring repr. There's probably a dupe around here somewhere.nnmeans exactlynn- two charsn. If you need its hex code -hex(ord('n'))