libtinsC++ 网络抓包和操作库
libtins 是一个高级支持多平台的 C++ 网络抓包和操作库。开发者可以利用 libtins 在应用实现对网络数据包的分析和操作。
示例代码:
#include <iostream> #include <tins/tins.h> using namespace Tins; bool handler(const PDU &pdu) { const IP &ip = pdu.rfind_pdu<IP>(); // Find the IP layer const TCP &tcp = pdu.rfind_pdu<TCP>(); // Find the TCP layer std::cout << ip.src_addr() << ':' << tcp.sport() << " -> " << ip.dst_addr() << ':' << tcp.dport() << std::endl; return true; } int main() { Sniffer("eth0").sniff_loop(handler); }
评论
pypcapPython网络抓包库
Ethereal自带许多协议的decoder,简单,易用,基于winpcap的一个开源的软件.但是它的架构并不灵活,如何你要加入一个自己定义的的解码器,得去修改Ethereal的代码,再重新编译,很烦
pypcapPython网络抓包库
0
Jpcap_Java网络抓包工具
Jpcap是捕获和发送网络包的Java库。Jpcap是基于libcap和winpcap的,所以Jpcap可以运行在任意支持libcap或者winpcap的平台上(Linux,Windows,FreeB
Jpcap_Java网络抓包工具
0