我正在尝试将十六进制转换为ascii,但这样做有极大的困难--
>>> pkt[9][3].sprintf("%Raw.load%")
"'\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x1d\\x01\\x04\\xfe\\t\\x00\\xb4\\xc0\\xa8\\x00!\\x00'"
>>> pkt[9][3].sprintf("%Raw.load%").decode("hex")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/encodings/hex_codec.py", line 42, in hex_decode
output = binascii.a2b_hex(input)
TypeError: Odd-length string
目前没有回答
相关问题 更多 >
编程相关推荐