随笔分类 - ARPSpoofing
摘要:本程序的主要目标是展示如何解析所捕获的数据包的协议首部。 这个程序可以称为UDPdump,打印一些网络上传输的UDP数据的信息。 1: #include"pcap.h" 2: typedef struct ip_address{ 3: u_char byte1,byte2,byte3,byte4; 4: }ip_address; 5: typedef st...
阅读全文
摘要:1: #include"pcap.h" 2: //每次捕获到数据包时,libpcap都会自动调用这个回调函数 3: void packet_handler(u_char *param,const pcap_pkthdr*header,const u_char *ptk_data){ 4: 5: char timestr[16]; 6: ...
阅读全文
摘要:WinPcap中文API http://www.ferrisxu.com/WinPcap/html/index.html 1: #include"pcap.h" 2: #include 3: #define IPTOSBUFFERS 12 4: char *iptos(u_long in){ 5: static char output[IPTOSBUF...
阅读全文