我想要获取数据包字段的字符串表示,如下所示:
pkt[BOOTP].op == 'BOOTREPLY'
到目前为止,我发现的唯一麻烦的方法是:
pkt[BOOTP].fields_desc[0].i2repr(pkt[BOOTP], 2)
还有别的主意吗?
发布于 2020-02-08 21:55:21
您可以使用sprintf
pkt.sprintf("%BOOTP.op%")
https://stackoverflow.com/questions/60118109
相似问题