Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 bro 直接读取数据包有效负载的字节。
我有一个字符串值“\x10”,我想得到它的十进制值。
我知道兄弟支持直接将十六进制打印为十进制:
print 0x10;
问题是,我如何将该字符串转换为其整数版本?
你能做的最好的就是去掉 "\x" 部分,并通过 2 个 BIF 运行它:
bytestring_to_count(hexstr_to_bytestring("10"));