Hyperscan
‘s pcapCorpus.py script can convert a pcap
file containing UDP and TCP packets to a corpus file which can be processed by hsbench program, I did some improvements to this script:
a) Support parsing VLAN packets;
b) Continue to handle instead of exit when meeting exceptional packets.
P.S., the code can be downloaded here.