通过unix套接字输出捕获snort事件的python侦听器
snortunsock的Python项目详细描述
用法
基本用法
importdpktfromsnortunsockimportsnort_listenerformsginsnort_listener.start_recv("/tmp/snort_alert"):print('alertmsg: %s'%''.join(msg.alertmsg))buf=msg.pkt# buf is a raw packet which can use dpkt library to parsing it# Unpack the Ethernet frame (mac src/dst, ethertype)eth=dpkt.ethernet.Ethernet(buf)
复杂的示例位于examples文件夹中
许可证
apache许可证,2.0版