freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于winpcap的嗅探器設(shè)計(jì)與實(shí)現(xiàn)_畢業(yè)設(shè)計(jì)(更新版)

2024-08-31 08:05上一頁面

下一頁面
  

【正文】 dr6*)malloc(sizeof(struct iphdr6))。 break。 dataiphttl = iphttl。 npacketn_ip++。 strcpy(datapktType,ARP)。 dataarphar_srcip[i] = arphar_srcip[i]。 } return 1。 case 0x0800: return analyze_ip((u_char*)pkt+14,data,npacket)。 for(i=0。 else (_T(%02x),dataiph6daddr[n])。 if(0x0806 == dataethhtype) { (_T(%d.%d.%d.%d),dataarphar_destip[0], dataarphar_destip[1],dataarphar_destip[2],dataarphar_destip[3])。 buf = CString(i_ntoa(in))。 /*顯示目的 MAC*/ ()。 /*顯示時間戳 */ (_T(%d/%d/%d %d:%d:%d),datatime[0], datatime[1],datatime[2],datatime[3],datatime[4],datatime[5])。 datatime[0] = ltimetm_year+1900。 //將本地化后的數(shù)據(jù)裝入一個鏈表中,以便后來使用 ppkt_data = (u_char*)malloc(headerlen)。 struct datapkt *data = (struct datapkt*)malloc(sizeof(struct datapkt))。 //數(shù)據(jù)包頭 const u_char *pkt_data=NULL,*pData=NULL。 MessageBox(str)。 if(dumpfile==NULL) { MessageBox(_T(文件創(chuàng)建錯誤! ))。 ltime=localtime(amp。 char thistime[30]。fcode, filter, 1, mask) 0 ) { MessageBox(_T(語法錯誤,無法編譯過濾器 ))。 int len,x。 else mask=0xffffff。count++) dev=devnext。 filter_index = this()。 (FALSE)。 } /*初始化過濾規(guī)則列表 */ (_T(tcp))。 (6,_T(源 IP地址 ),3,145)。 // 設(shè)置小圖標(biāo) ShowWindow(SW_MINIMIZE)。 ASSERT(IDM_ABOUTBOX 0xF000)。 pcap_pile()它將一個高層的布爾過濾表達(dá)式 編譯成一 個能夠被過濾引擎所解釋的低層的字節(jié)碼。嗅探器設(shè)置模塊主要調(diào)用 w inP c aP 提供的 API,分為獲取網(wǎng)絡(luò)設(shè)備信息 , 設(shè)置并編譯過濾器 ,打開網(wǎng)絡(luò)設(shè)備三個步驟。 網(wǎng)卡是網(wǎng)絡(luò)中節(jié)點(diǎn)主機(jī)的關(guān)鍵硬件設(shè)備。所謂嗅探器 ( Sniffer) ,是一種利用計(jì)算機(jī)網(wǎng)絡(luò)接口截獲網(wǎng)絡(luò)數(shù)據(jù)的軟件或硬件,可用于網(wǎng)絡(luò)管理、網(wǎng)絡(luò)協(xié)議分析以及網(wǎng)絡(luò)安全等眾多方面。可以將這些 捕獲到的信息包存檔,以利用相應(yīng)工具可以作進(jìn)一步分析。單播模式 : 只有匹配的目的網(wǎng)卡才能接收數(shù)據(jù)信息。讀取到的任意一個符合捕獲條件數(shù)據(jù)包 , 將其內(nèi)容解析 , 并顯示本數(shù)據(jù)包。 數(shù)據(jù)包的捕獲模塊 該部分創(chuàng)建了一個用于捕獲數(shù)據(jù)包的線程 , 在該線程中調(diào)用 winPcap提供的 pcap_next_ex()函數(shù)從底層驅(qū)動數(shù)據(jù)緩沖區(qū)中讀取數(shù)據(jù)包 , 該函數(shù)接受已 打開的網(wǎng)絡(luò)設(shè)備句柄 , 返回捕獲數(shù)據(jù)包的實(shí)體 ,并用 pcap_dump函數(shù)將每一 個數(shù)據(jù)包寫人臨時文件中。 (IDS_ABOUTBOX)。 //1表示右,表示中,表示左 (1,_T(時間 ),3,130)。 (_T(請選擇過濾規(guī)則 (可選 )))。 (_T(icmp))。 u_int mask。 } if(CB_ERR == filter_index) { MessageBox(_T(過濾器選擇錯誤 ))。 return 1。fcode, filter, 1, mask) 0 ) { MessageBox(_T(語法錯誤,無法編譯過濾器 ))。 filter = (char*)malloc(len)。 } } //設(shè)置過濾器 if (pcap_setfilter(adhandle, amp。 memset(filename,0,64)。 strcpy(filepath,SavedData\\)。 /*接收數(shù)據(jù),新建線程處理 */ LPDWORD threadCap=NULL。 } 數(shù)據(jù)包處理 DWORD WINAPI sniffer_CapThread(LPVOID lpParameter) { int res,nItem 。 if(NULL == pthism_ThreadHandle) { MessageBox(NULL,_T(線程句柄錯誤 ),_T(提示 ),MB_OK)。 return 1。 pthis(ppkt_data)。 datatime[3] = ltimetm_hour。 (_T(%d),datalen)。 /*獲得協(xié)議 */ pthis(nItem,5,CString(datapktType))。n8。 buf = CString(i_ntoa(in))。 } return 1。 dataethhsrc[i] = ethhsrc[i]。 return 1。 dataarph = (struct arphdr*)malloc(sizeof(struct arphdr))。 } dataarphar_hln = arphar_hln。 } /*分析網(wǎng)絡(luò)層: IP*/ int analyze_ip(const u_char* pkt,datapkt *data,struct pktcount *npacket) { int i。 dataiphfrag_off = iphfrag_off。 dataiphop_pad = iphop_pad。 default : return1。 dataiph6version = iph6version。i++) { dataiph6saddr[i] = iph6saddr[i]。 default : return1。 dataicmphseq =icmphseq。 if(NULL == dataicmph6) return 1。i6。 datatcphack_seq = tcphack_seq。 datatcphpsh = tcphpsh。 datatcphwindow= tcphwindow。 dataudph = (struct udphdr*)malloc(sizeof(struct udphdr))。 return 1。 rowcount = (size_pkti) 16 ? 16 : (size_pkti)。 j rowcount。
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1