简介

Linux 下几乎所有的抓包技术都是基于libcap的,包括可以兼容DPDK 的pcaplusplus。

libpcap 是一个网络数据包捕获函数库,功能非常强大,Linux 下著名的 tcpdump 就是以它为基础的。在Windows平台上,也有一款与其功能类似的开发库:Wincap。

libpcap主要的作用

  1. 捕获各种数据包,列如:网络流量统计。
  2. 过滤网络数据包,列如:过滤掉本地上的一些数据,类似防火墙。
  3. 分析网络数据包,列如:分析网络协议,数据的采集。
  4. 存储网络数据包,列如:保存捕获的数据以为将来进行分析。

从功能的角度上讲,libcap 只是一种旁路机制,也就是说它可以复制数据包,分析数据包,但是不可以将网卡中原来的数据包截住,并且丢去,所以libcap的定位就是一个抓包的tool,而不是一个防火墙工具,如果想了解防火墙怎么实现可以参考我的这边文章:Linux 内核开发 - NetFilter_Ym影子的博客-CSDN博客

本篇文章中主要讲libcap 的主要概念、原理、架构以及相关的使用DEMO。

语言上主要使用两种语言:C、Python。

框架上主要介绍python 的scapy:网络抓包技术: scapy_Ym影子的博客-CSDN博客

libpcap主要由两部份组成:网络分接口(Network Tap)和数据过滤器(Packet Filter)。

网络分接口从网络设备驱动程序中收集数据拷贝(旁路机制),过滤器决定是否接收该数据包。Libpcap利用BSD Packet Filter(BPF)算法对网卡接收到的链路层数据包进行过滤。BPF算法的基本思想是在有BPF监听的网络中,网卡驱动将接收到的数据包复制一份交给BPF过滤器,过滤器根据用户定义的规则决定是否接收此数据包以及需要拷贝该数据包的那些内容,然后将过滤后的数据给与过滤器相关联的上层应用程序。如果没有定义规则,则把全部数据交给上层应用程序。

下面介绍Libpcap的抓包流程:

  1. 查找网络设备:目的是发现可用的网卡,实现的函数为pcap_lookupdev(),如果当前有多个网卡,函数就会返回一个网络设备名的指针列表。
  2. 打开网络设备:利用上一步中的返回值,可以决定使用哪个网卡,通过函数pcap_open_live()打开网卡,返回用于捕捉网络数据包的秒数字。
  3. 获得网络参数:这里是利用函数pcap_lookupnet(),可以获得指定网络设备的IP地址和子网掩码。
  4. 编译过滤策略:Lipcap的主要功能就是提供数据包的过滤,函数pcap_compile()来实现。
  5. 设置过滤器:在上一步的基础上利用pcap_setfilter()函数来设置。
  6. 利用回调函数,捕获数据包:函数pcap_loop()和pcap_dispatch()来抓去数据包,也可以利用函数pcap_next()和pcap_next_ex()来完成同样的工作。
  7. 关闭网络设备:pcap_close()函数关系设备,释放资源。

功能

libcap

1.获取网络接口

char * pcap_lookupdev(char * errbuf) //上面这个函数返回第一个合适的网络接口的字符串指针,如果出错,则errbuf存放出错信息字符串,errbuf至少应该是PCAP_ERRBUF_SIZE个字节长度的

int pcap_lookupnet(const char * device, bpf_u_int32 * netp, bpf_u_int32 * maskp, char * errbuf) //可以获取指定设备的ip地址,子网掩码等信息 //netp:传出参数,指定网络接口的ip地址 //maskp:传出参数,指定网络接口的子网掩码 //pcap_lookupnet()失败返回-1

//net,mask的转换方式,inet_ntoa可以把他转换成10机制字符串 头文件 arpa/inet.h

addr.s_addr=netp;

net=inet_ntoa(addr);

addr.s_addr=maskp;

mask=inet_ntoa(addr);

Demo

#include <stdio.h>
#include <pcap.h>
#include <time.h>
#include <netinet/in.h>
#include <arpa/inet.h>void show_ip_mask(char* dev)
{char errbuf[1024];struct in_addr addr;char *net,*mask;bpf_u_int32 netp,maskp;int err=pcap_lookupnet(dev,&netp,&maskp,errbuf);if(err==-1){printf("couldn't detect the ip and maskp: %s\n",errbuf);return;}addr.s_addr=netp;net=inet_ntoa(addr);if(net==NULL){printf("ip error\n");return;}printf("ip: %s\n",net);addr.s_addr=maskp;mask=inet_ntoa(addr);if(mask==NULL){printf("mask errorn");return;}printf("mask: %s\n",mask);
}int main()
{char *dev, errbuf[1024];char select='a';printf("select(dispaly the packet in detail)/n:( Y/N ?))");scanf("%c",&select);while(select!='Y'&&select!='y'&&select!='n'&&select!='N'){printf("input the error!\nplease input the Y/N/y/n:");scanf("%c",&select);}//look for the net devicedev=pcap_lookupdev(errbuf);if(dev==NULL){printf("couldn't find default device: %s\n",errbuf);return 1;}else{printf("fidn success: device :%s\n",dev);}//ip mask displayshow_ip_mask(dev);return 0;
}

2.释放网络接口

void pcap_close(pcap_t * p) //该函数用于关闭pcap_open_live()获取的pcap_t的网络接口对象并释放相关资源。

3.打开网络接口

pcap_t * pcap_open_live(const char * device, int snaplen, int promisc, int to_ms, char * errbuf)
//上面这个函数会返回指定接口的pcap_t类型指针,后面的所有操作都要使用这个指针。
//第一个参数是第一步获取的网络接口字符串,可以直接使用硬编码。
//第二个参数是对于每个数据包,从开头要抓多少个字节,我们可以设置这个值来只抓每个数据包的头部,而不关心具体的内容。典型的以太网帧长度是1518字节,但其他的某些协议的数据包会更长一点,但任何一个协议的一个数据包长度都必然小于65535个字节。
//第三个参数指定是否打开混杂模式(Promiscuous Mode),0表示非混杂模式,任何其他值表示混合模式。如果要打开混杂模式,那么网卡必须也要打开混杂模式,可以使用如下的命令打开eth0混杂模式:ifconfig eth0 promisc
//第四个参数指定需要等待的毫秒数,超过这个数值后,第3步获取数据包的这几个函数就会立即返回。0表示一直等待直到有数据包到来。
//第五个参数是存放出错信息的数组。

4.获取数据包

u_char * pcap_next(pcap_t * p, struct pcap_pkthdr * h)
//如果返回值为NULL,表示没有抓到包
//第一个参数是第2步返回的pcap_t类型的指针
//第二个参数是保存收到的第一个数据包的pcap_pkthdr类型的指针//pcap_pkthdr类型的定义如下:
struct pcap_pkthdr
{struct timeval ts;    /* time stamp */bpf_u_int32 caplen;   /* length of portion present */bpf_u_int32 len;      /* length this packet (off wire) */
};int pcap_loop(pcap_t * p, int cnt, pcap_handler callback, u_char * user)
//第一个参数是第2步返回的pcap_t类型的指针
//第二个参数是需要抓的数据包的个数,一旦抓到了cnt个数据包,pcap_loop立即返回。负数的cnt表示pcap_loop永远循环抓包,直到出现错误。
//第三个参数是一个回调函数指针,它必须是如下的形式:
void callback(u_char * userarg, const struct pcap_pkthdr * pkthdr, const u_char * packet)
//第一个参数是pcap_loop的最后一个参数,当收到足够数量的包后pcap_loop会调用callback回调函数,同时将pcap_loop()的user参数传递给它
//第二个参数是收到的数据包的pcap_pkthdr类型的指针
//第三个参数是收到的数据包数据int pcap_dispatch(pcap_t * p, int cnt, pcap_handler callback, u_char * user)
//这个函数和pcap_loop()非常类似,只是在超过to_ms毫秒后就会返回(to_ms是pcap_open_live()的第4个参数)

Demo

#include <stdio.h>
#include <pcap.h>
#include <time.h>void capture_packet1(pcap_t* device)
{struct pcap_pkthdr packet;char errbuf[1024];//capture the packet        const u_char* pkt=pcap_next(device,&packet);if(!pkt){printf("couldn't capture packet: %s\n",errbuf);return;}//output the pacaket length byte and timeprintf("Packet length: %d\n", packet.len);  printf("Number of bytes: %d\n", packet.caplen);  printf("Recieved time: %s\n", ctime((const time_t*)&packet.ts.tv_sec));
}void getPacket(u_char * arg, const struct pcap_pkthdr * pkthdr, const u_char * packet)
{int * id = (int *)arg;  printf("id: %d\n", ++(*id));  printf("Packet length: %d\n", pkthdr->len);  printf("Number of bytes: %d\n", pkthdr->caplen);  printf("Recieved time: %s\n", ctime((const time_t *)&pkthdr->ts.tv_sec));   //print packet int i;  for(i=0; i<pkthdr->len; ++i)  {  printf(" %02x", packet[i]);  if( (i + 1) % 16 == 0 )   printf("\n");  }  printf("\n\n");
}void capture_packet2(pcap_t* device)
{struct pcap_pkthdr packet;int id = 0;//capture the packetpcap_loop(device,-1,getPacket,(u_char*)&id);
}int main()
{char *dev, errbuf[1024];char select='a';printf("select(dispaly the packet in detail)/n:( Y/N ?))");scanf("%c",&select);while(select!='Y'&&select!='y'&&select!='n'&&select!='N'){printf("input the error!\nplease input the Y/N/y/n:");scanf("%c",&select);}//look for the net devicedev=pcap_lookupdev(errbuf);if(dev==NULL){printf("couldn't find default device: %s\n",errbuf);return 1;}else{printf("fidn success: device :%s\n",dev);}//open the finded device(must set :ifconfig eth0 promisc)pcap_t* device=pcap_open_live(dev,65535,1,0,errbuf);if(!device){printf("couldn't open the net device: %s\n",errbuf);return 1;}if(select=='Y')capture_packet2(device);elsewhile(1)//由于pcap_next()函数只返回下一个数据包的指针capture_packet1(device); return 0;
}

5.分析数据包

根据不同的网络协议,来设计不同的数据包分析方法,具体参考相关协议的说明。

6.过滤数据包(这部分是非常重要的)

libpcap利用BPF来过滤数据包。
过滤数据包需要完成3件事:
a) 构造一个过滤表达式
b) 编译这个表达式
c) 应用这个过滤器

PS:Lipcap已经把BPF语言封装成为了更高级更容易的语法了。

src host 127.0.0.1
//选择只接受某个IP地址的数据包dst port 8000
//选择只接受TCP/UDP的目的端口是80的数据包not tcp
//不接受TCP数据包tcp[13]==0x02 and (dst port ** or dst port **)
//只接受SYN标志位置(TCP首部开始的第13个字节)且目标端口号是22或23的数据包icmp[icmptype]==icmp-echoreply or icmp[icmptype]==icmp-echo
//只接受icmp的ping请求和ping响应的数据包ehter dst 00:00:00:00:00:00
//只接受以太网MAC地址为00:00:00:00:00:00的数据包ip[8]==5
//只接受ip的ttl=5的数据包(ip首位第八的字节为ttl)

构造完过滤表达式后,就可以使用pcap_compile()函数来编译。

最后通过函数pcap_setfilter()来设置这个规则

int pcap_compile(pcap_t * p, struct bpf_program * fp, char * str, int optimize, bpf_u_int32 netmask)
//fp:这是一个传出参数,存放编译后的bpf
//str:过滤表达式
//optimize:是否需要优化过滤表达式
//metmask:简单设置为0即可int pcap_setfilter(pcap_t * p,  struct bpf_program * fp)
//参数fp就是pcap_compile()的第二个参数,存放编译后的bpf

样例

基于libcap实现的网络嗅探工具

#include <stdio.h>
#include <pcap.h>
#include <time.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <string.h>//链路层数据包格式
typedef struct {u_char DestMac[6];u_char SrcMac[6];u_char Etype[2];
}ETHHEADER;
//IP层数据包格式
typedef struct {int header_len:4;int version:4;u_char tos:8;int total_len:16;int ident:16;int flags:16;u_char ttl:8;u_char proto:8;int checksum:16;u_char sourceIP[4];u_char destIP[4];
}IPHEADER;
//协议映射表
char *Proto[]={"Reserved","ICMP","IGMP","GGP","IP","ST","TCP"
};
//回调函数
void pcap_handle(u_char* user,const struct pcap_pkthdr* header,const u_char* pkt_data)
{ETHHEADER *eth_header=(ETHHEADER*)pkt_data;printf("---------------Begin Analysis-----------------\n");printf("----------------------------------------------\n");printf("Packet length: %d \n",header->len);//解析数据包IP头部if(header->len>=14){IPHEADER *ip_header=(IPHEADER*)(pkt_data+14);//解析协议类型char strType[100];if(ip_header->proto>7)strcpy(strType,"IP/UNKNWN");elsestrcpy(strType,Proto[ip_header->proto]);printf("Source MAC : %02X-%02X-%02X-%02X-%02X-%02X==>",eth_header->SrcMac[0],eth_header->SrcMac[1],eth_header->SrcMac[2],eth_header->SrcMac[3],eth_header->SrcMac[4],eth_header->SrcMac[5]);printf("Dest   MAC : %02X-%02X-%02X-%02X-%02X-%02X\n",eth_header->DestMac[0],eth_header->DestMac[1],eth_header->DestMac[2],eth_header->DestMac[3],eth_header->DestMac[4],eth_header->DestMac[5]);printf("Source IP : %d.%d.%d.%d==>",ip_header->sourceIP[0],ip_header->sourceIP[1],ip_header->sourceIP[2],ip_header->sourceIP[3]);printf("Dest   IP : %d.%d.%d.%d\n",ip_header->destIP[0],ip_header->destIP[1],ip_header->destIP[2],ip_header->destIP[3]);printf("Protocol : %s\n",strType);//显示数据帧内容int i;  for(i=0; i<(int)header->len; ++i)  {  printf(" %02x", pkt_data[i]);  if( (i + 1) % 16 == 0 )   printf("\n");  }  printf("\n\n");}
}int main(int argc, char **argv)
{char *device="eth0";char errbuf[1024];pcap_t *phandle;bpf_u_int32 ipaddress,ipmask;struct bpf_program fcode;int datalink;if((device=pcap_lookupdev(errbuf))==NULL){perror(errbuf);return 1;}elseprintf("device: %s\n",device);phandle=pcap_open_live(device,200,0,500,errbuf);if(phandle==NULL){perror(errbuf);return 1;}if(pcap_lookupnet(device,&ipaddress,&ipmask,errbuf)==-1){perror(errbuf);return 1;}else{char ip[INET_ADDRSTRLEN],mask[INET_ADDRSTRLEN];if(inet_ntop(AF_INET,&ipaddress,ip,sizeof(ip))==NULL)perror("inet_ntop error");else if(inet_ntop(AF_INET,&ipmask,mask,sizeof(mask))==NULL)perror("inet_ntop error");printf("IP address: %s, Network Mask: %s\n",ip,mask);}int flag=1;while(flag){//input the design filterprintf("Input packet Filter: ");char filterString[1024];scanf("%s",filterString);if(pcap_compile(phandle,&fcode,filterString,0,ipmask)==-1)fprintf(stderr,"pcap_compile: %s,please input again....\n",pcap_geterr(phandle));elseflag=0;}if(pcap_setfilter(phandle,&fcode)==-1){fprintf(stderr,"pcap_setfilter: %s\n",pcap_geterr(phandle));return 1;}if((datalink=pcap_datalink(phandle))==-1){fprintf(stderr,"pcap_datalink: %s\n",pcap_geterr(phandle));return 1;}printf("datalink= %d\n",datalink);pcap_loop(phandle,-1,pcap_handle,NULL);return 0;
}

使用libcap 、libnet 将包进行发送

#include<stdio.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<pcap.h>
#include<netinet/in.h>
#include<netinet/tcp.h>
#include<string.h>
#include<stdlib.h>
#include<arpa/inet.h>
#define ETHER_ADDR_LEN 6
/*以太网头*/
struct sniff_ethernet
{u_char ether_dhost[ETHER_ADDR_LEN];u_char ether_shost[ETHER_ADDR_LEN];u_short ether_type;
};
/*IP头*/
struct sniff_ip
{u_char ip_vhl;u_char ip_tos;u_short ip_len;u_short ip_id;u_short ip_off;#define IP_RF 0x8000#define IP_DF 0x4000#define IP_MF 0x2000#define IP_OFFMASK 0x1fffu_char ip_ttl;u_char ip_p;u_short ip_sum;struct in_addr ip_src,ip_dst;
};
/*TCP头*/
typedef u_int tcp_seq;
struct sniff_tcp
{u_short th_sport;u_short th_dport;tcp_seq th_seq;tcp_seq th_ack;u_char th_offx2;u_char th_flags;u_short th_win;u_short th_sum;u_short th_urp;
};
/*UDP报头*/
struct sniff_udp
{u_short udp_sport;u_short udp_dport;u_short udp_len;u_short udp_sum;
};
/*DNS报头*/
struct sniff_dns
{u_short dns_id;u_short dns_flag;u_short dns_ques;u_short dns_ans;u_short dns_auth;u_short dns_add;u_int8_t *dsn_data;
};
//数据包到达回调函数
void packetcall(u_char *user,const struct pcap_pkthdr *pcap_head,const u_char *packet);
char *ipstr(struct in_addr s_addr);
char* getpackettype(u_short packet_type);
char* toString(u_long s);
//由u_char[6]获取网卡地址字符串
char *getMac(u_char *host);
int main(int argc,char **argv)
{char *dev,errbuf[PCAP_ERRBUF_SIZE];pcap_t *handler;struct bpf_program fp;char filter_exp[50]="ip and dst 172.20.92.118";if(argc==3){sprintf(filter_exp,"dst %s and dst port %s",argv[1],argv[2]);}if(argc==5){sprintf(filter_exp,"dst %s and dst port %s or src %s and src port %s",argv[1],argv[2],argv[3],argv[4]);}bpf_u_int32 mask;bpf_u_int32 net;struct pcap_pkthdr header;const u_char *packet;dev=pcap_lookupdev(errbuf);if(dev==NULL){fprintf(stderr,"could not find default device:%s\n",errbuf);return 2;}printf("device:%s\n",dev);if(pcap_lookupnet(dev,&net,&mask,errbuf)==-1){fprintf(stderr,"counld not get netmask for device %s;%s\n",dev,errbuf);net=0;mask=0;}handler=pcap_open_live(dev,BUFSIZ,1,10000,errbuf);if(handler==NULL){fprintf(stderr,"could not open device %s;%s",dev,errbuf);return 2;}if(pcap_compile(handler,&fp,filter_exp,0,net)==-1){fprintf(stderr,"counld not parse filter %s;%s\n",filter_exp,pcap_geterr(handler));return 2;}if(pcap_setfilter(handler,&fp)==-1){fprintf(stderr,"counld not install filter %s;%s\n",filter_exp,pcap_geterr(handler));return 2;}//捕获数据包int packetnums=20;packet=pcap_loop(handler,packetnums,packetcall,NULL);pcap_close(handler);return 0;
}
//数据包到达回调函数
void packetcall(u_char *user,const struct pcap_pkthdr *pcap_head,const u_char *packet)
{static int count=1;//数据包计数struct sniff_ethernet *ethernet;//以太网包头struct sniff_ip *ip;//ip包头struct sniff_udp *udp;//udp包头struct sniff_dns *dns;//dns报头const u_char *payload;//数据包负载的数据int pay_size;//数据包负载的数据大小ethernet=(struct sniff_ethernet*)(packet);ip=(struct sniff_ip*)(packet + sizeof(struct sniff_ethernet));udp=(struct sniff_udp*)(packet + sizeof(struct sniff_ethernet)+sizeof(struct sniff_ip));dns=(struct sniff_dns*)(packet + sizeof(struct sniff_ethernet) + sizeof(struct sniff_ip) + sizeof(struct sniff_udp));payload=(u_char *)(packet+sizeof(struct sniff_ethernet)+sizeof(struct sniff_ip)+sizeof(struct sniff_udp)+sizeof(struct sniff_dns));pay_size=ntohs(udp->udp_len)-sizeof(struct sniff_udp)-sizeof(struct sniff_dns);printf("-------------数据包:%d\n",count);printf("数据包类型:%s\n",getpackettype(ethernet->ether_type));printf("源地址:%X:%X:%X:%X:%X:%X\n",(ethernet->ether_shost)[0],(ethernet->ether_shost)[1],(ethernet->ether_shost)[2],(ethernet->ether_shost)[3],(ethernet->ether_shost)[4],(ethernet->ether_shost)[5]);printf("目的地址:%X:%X:%X:%X:%X:%X\n",(ethernet->ether_dhost)[0],(ethernet->ether_dhost)[1],(ethernet->ether_dhost)[2],(ethernet->ether_dhost)[3],(ethernet->ether_dhost)[4],(ethernet->ether_dhost)[5]);printf("From:%s\n",inet_ntoa(ip->ip_src));printf("To:%s\n",inet_ntoa(ip->ip_dst));printf("源端口:%d\n",ntohs(udp->udp_sport));printf("目的端口:%d\n",ntohs(udp->udp_dport));printf("DNS查询问题数%d\n",ntohs(dns->dns_ques));if(pay_size>0){printf("Payload    data size %d\n",pay_size);const u_char *ch=payload;int i,j;for(i=0;i<ntohs(dns->dns_ques);i++){//获取各查询名printf("第%d个查询名\n",i);int k=1;//标志符号;while(1){if(*ch==0)break;u_int8_t identify_size=*ch;printf("\t第%d个标志符号\n",k);ch++;for(j=0;j<identify_size;j++,ch++){if(isprint(*ch)){printf("%c",*ch);}else{printf(".");}}k++;}}}count++;
}
#include<stdio.h>
#include<libnet.h>
#define MAC_ADDR_LEN 6
#define IP_ADDR_LEN 4
#define LIBNET_DNS_H 0xc
int main(int argc,char **argv)
{libnet_t *net_t=NULL;char *dev="eth0";char err_buf[LIBNET_ERRBUF_SIZE];libnet_ptag_t p_tag;unsigned char src_mac[MAC_ADDR_LEN]={0x00,0x00,0xf1,0xe8,0x0e,0xc8};//发送者网卡地址unsigned char dst_mac[MAC_ADDR_LEN]={0xff,0xff,0xff,0xff,0xff,0xff};//接收者网卡地址char *src_ip_str="172.20.92.117";if(argc==2){if(strcmp(argv[1],"-h")==0||strcmp(argv[1],"--help")==0){printf("%s","help message");}else{src_ip_str=argv[1];}}unsigned long src_ip,dst_ip=0;src_ip=libnet_name2addr4(net_t,src_ip_str,LIBNET_RESOLVE);//将字符串类型的ip转换为顺序网络字节流net_t=libnet_init(LIBNET_LINK_ADV,dev,err_buf);//初始化发送包结构if(net_t==NULL){printf("libnet_init error\n");exit(0)}p_tag=libnet_build_arp(ARPHRD_ETHER,//hardware type ethernetETHERTYPE_IP,//protocol typeMAC_ADDR_LEN,//mac lengthIP_ADDR_LEN,//protocol lengthARPOP_REPLY,//op type(u_int8_t*)src_mac,//source mac addr这里的作用是更新目的地的arp表(u_int8_t*)&src_ip,//source ip addr(u_int8_t*)dst_mac,//source mac addr(u_int8_t*)&dst_ip,//dest ip addrNULL,//payload0,//payload lengthnet_t,//libnet context0//0 stands to build a new one);if(-1 == p_tag){printf("libnet_build_arp error");exit(0);}//以太网头部p_tag=libnet_build_ethernet(//create ethernet header(u_int8_t*)dst_mac,//dest mac addr(u_int8_t*)src_mac,//source mac addrETHERTYPE_ARP,//protocol typeNULL,//payload0,//payload lengthnet_t,//libnet context0//0 to build a new one);if(-1 == p_tag){printf("libnet_build_ethernet error!\n");exit(1);}int res;if(-1==(res=libnet_write(net_t))){printf("libnet_write error!\n");exit(1);}libnet_destroy(net_t);return 0;
}

网络抓包技术:libcap相关推荐

  1. 网络抓包技术备忘 - Wireshark/Fiddler/Libpcap/Npcap/WinPcap/SharpPcap

    本文链接:网络抓包技术备忘-俊哥V-CSDN博客 1.常用工具 浏览器自带,如谷歌浏览器的开发人员工具. Fiddler:主要是捕获HTTP.HTTPS数据包. Wireshark:网络协议分析工具, ...

  2. 基于java的网络抓包技术研究与实现(转)

    一.实验内容描述 本实验是用java实现的网络抓包程序,在windows环境下安装winpcap4.0和jpcap6.0后,下载eclipse和jigloo插件(一种在eclipse底下作图形化开发的 ...

  3. 网络抓包技术: scapy

    概念 Scapy是一个 Python程序,它允许用户发送.嗅探.分析和伪造网络包.这种能力允许构建能够探测.扫描或攻击网络的工具. 换句话说,Scapy是一个强大的交互式包操作程序.它能够伪造或解码大 ...

  4. java 网络抓包_基于java的网络抓包方法

    本实验是用java实现的网络抓包程序,在windows环境下安装winpcap4.0和jpcap6.0后,下载eclipse和jigloo插件(一种在eclipse底下作图形化开发的工具),将其安装好 ...

  5. 网络抓包wireshark

    网络抓包wireshark 抓包应该是每个技术人员掌握的基础知识,无论是技术支持运维人员或者是研发,多少都会遇到要抓包的情况,用过的抓包工具有fiddle.wireshark,作为一个不是经常要抓包的 ...

  6. 黑客必用神器,网络抓包工具

    点击上方" 程序IT圈 ",选择"置顶公众号" 每天早晨8点50分,准点开车打卡 来源:blog.csdn.net/xjpdf10/article/detail ...

  7. 三种经典iPhone上网络抓包方法详解

    很多时候需要网络抓包分析,在iPhone上抓包稍有不同,下面介绍三种常用的方式.分析工具以wireshark为例. 一.最简单的方式:用PC作为热点,在PC上抓包 优点:简单: 缺点:不能抓真机2G/ ...

  8. 网络抓包-winpcap

    1. winpcap 1. winpcap简介 (windows packet capture)是windows平台下一个免费,公共的网络访问系统.开发winpcap这个项目的目的在于为win32应用 ...

  9. 自己动手写网络抓包工具

    看了太多的"自己动手",这次咱也"自己动手"一下,写个简单的网络抓包工具吧.要写出像tcpdump和wireshark(ethereal)这样的大牛程序来,咱也 ...

最新文章

  1. simuvex 符号分析形象解释
  2. css鼠标移入线条延中心伸长,jquery鼠标悬浮,显示动态延伸线条,如何在鼠标移开后依然让线条元素延伸到终点...
  3. iOS:使用block进行类与类,控制器与控制器之间的传值
  4. 【AAAI2021】NLP所有方向论文列表(情感分析、句法、NER、对话/问答、关系抽取、KD等)...
  5. C#:使用dsoframer.ocx控件实现内嵌office效果(详解)
  6. 不需要各种代码的MATLAB语法高亮的设置,简单实用
  7. 上古计算机语言,微软开源其上古编程语言GW-BASIC
  8. 雨林木风推出高仿Windows操作系统
  9. 激光雷达系统原理及相关介绍
  10. 关于法线贴图、颜色贴图和高光贴图
  11. 如何用python爬取下载微博视频_Python通过抓包和使用cookie爬取微博完全讲解(附视频)-阿里云开发者社区...
  12. 一位工作了 10 年的 Java 高级架构师的技术之路
  13. 基于Struts的网上书店设计毕业论文(含源文件)
  14. 渗透技巧总结、渗透技巧
  15. notifier_call -----总结
  16. P3265 [JLOI2015] 线性基
  17. Java面向对象编程入门练习:Manager类继承Employee类并实现求得员工平均业绩
  18. nexus私库中的releases与snapshots区分
  19. 搜索引擎下拉食云速捷详细_下拉框搜索隙云速捷甄选,下拉框 搜索度云速捷真诚,...
  20. android app hilink,HUAWEI HiLink

热门文章

  1. css3 html5动画特效
  2. 福布斯中国——2007企业排名
  3. Feature-Driven Robust Surgery Scheduling 搬运
  4. Crux360:新iPad专属蓝牙键盘
  5. 第14周项目3 - B-树的基本操作
  6. Typora实现Markdown云笔记——Typora+有道云笔记+PicGo+阿里云OSS
  7. 实现一个安卓学习助手app
  8. FCS五色石 | 项目半月报(2020.5.1-2020.5.15)
  9. 以开发之名|斗罗大陆:创造一个尽情探险的开放式游戏世界
  10. 供应&需求链的结构化管理 (zt)