我想在Wireshark中分析一些dec \ hex字符串(以太网头)。它只能根据手册打开ASCII十六进制转储。是否有某些软件或一段代码可以解析带有十六进制值的字符串(按原样,不转储)并将其排序为十六进制转储格式?
答案 0 :(得分:0)
程序xxd能够将各种转储中的十六进制值“恢复”为二进制数据。
marshall@likon:[~/Hack]: cat hello
hello
how are you
marshall@likon:[~/Hack]: xxd -i < hello > blah
marshall@likon:[~/Hack]: cat blah
0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x0a, 0x68, 0x6f, 0x77, 0x20, 0x61, 0x72,
0x65, 0x20, 0x79, 0x6f, 0x75, 0x0a
marshall@likon:[~/Hack]: xxd -ps -r < blah > regen
marshall@likon:[~/Hack]: cat regen
hello
how are you
但是唯一确定是否会做的唯一方法是拥有一个数据样本,或者尝试一下。