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

正文內(nèi)容

網(wǎng)絡(luò)嗅探器的設(shè)計與實現(xiàn)(參考版)

2025-07-03 08:23本頁面
  

【正文】 returntrue。 (%s,buf)。fclose(fp)。 else buf[nCount]=39。} if(nCount0) buf[nCount1]=39。 intnCount=0。 if(NULL==fp) {returnfalse。}boolCCapturePacketDlg::LoadFilterString(){FILE*fp。 break。 ::Shell_NotifyIcon(NIM_MODIFY,amp。 =AfxGetApp()LoadIcon(IDI_ICON_SYSTEMTRAY)。 =NIF_MESSAGE|NIF_ICON|NIF_TIP。 =m_hWnd。 default: NOTIFYICONDATAnid。 PostMessage(WM_NULL)。point)。 CPointpoint。 CMenu*pMenu=(0)。 caseWM_RBUTTONDOWN: { CMenumenu。 ShowWindow(SW_SHOW)。 ::Shell_NotifyIcon(NIM_MODIFY,amp。 =AfxGetApp()LoadIcon(IDI_ICON_SYSTEMTRAY)。 =NIF_MESSAGE|NIF_ICON|NIF_TIP。 =m_hWnd。 if(wParam==ID_SYSTEMTRAY) { switch(lParam) { caseWM_LBUTTONDBLCLK: { NOTIFYICONDATAnid。 thisSetDlgItemText(IDC_EDIT_UDPPACKETCOUNT,m_strUdpCount)。 thisSetDlgItemText(IDC_EDIT_TOTALPACKETCOUNT,m_strTotalCount)。 thisSetDlgItemText(IDC_EDIT_TCPPACKETCOUNT,m_strTcpCount)。 thisSetDlgItemText(IDC_EDIT_OTHRERPACKETCOUNT,m_strOtherCount)。 thisSetDlgItemText(IDC_EDIT_ARPPACKETCOUNT,m_strArpCount)。 fputs(/itemdata,pFile)。 strHex+=hex。i++) {CStringhex。 for(unsignedshorti=0。}voidCCapturePacketDlg::insertNode(FILE*pFile,conststructpcap_pkthdr*pkt_header,constu_char*pkt_data){fputs(itemdata,pFile)。 fclose(pFile)。 fputs(/item,pFile)。 fputs(str,pFile)。nIndex++) {CStringstr。 for(intnIndex=0。 } fputs(?xmlversion=\\encoding=\GBK\?,pFile)。 if(pFile==NULL) {AfxMessageBox(創(chuàng)建文件失敗)。}boolCCapturePacketDlg::createXML(CStringstrFileName){FILE*pFile。ShowPacketForTree((index),(index),index)。longindex=(pos)。 POSITIONpos=()。 (strHex)。 strText+=hex。 strHex+=hex。} strHex+=hex。 if(i!=0) {strHex+=+strText。 if((i%16)==0) {nCount++。ipkt_headercaplen。 CStringstrText。 CStringstrHex。 (hRoot,TVE_EXPAND)。 }else{}deletepFramePacket。 deletepARPPacket。 。 hItem=(協(xié)議:RARP,hSubItem)。 pARPPacket=NULL。 hItem=(源IP:+pARPPacketGetSPAddr(),hSubItem)。 } elseif(pFramePacketGetType()==0x0806) {CARPPacket*pARPPacket=newCARPPacket(pkt_data+14,pkt_headerlen14)。 pTCPPacket=NULL。 hItem=(源端口:+pTCPPacketGetSrcPort(),hSubItem)。 } elseif(()==TCP) {CTCPPacket*pTCPPacket=newCTCPPacket((),())。 deletepUDPPacket。 。 hItem=(協(xié)議:UDP,hSubItem)。hSubItem=(傳輸層數(shù)據(jù),hRoot)。 。 h1=(吞吐量:+(),hItem)。 HTREEITEMh1=(可靠性:+(),hItem)。 。 hItem=(TTL值:+(),hSubItem)。 hItem=(目的IP:+(),hSubItem)。 hItem=(協(xié)議:IP,hSubItem)。if(pFramePacketGetType()==0x0800) {hSubItem=(網(wǎng)絡(luò)層數(shù)據(jù),hRoot)。 (類型:0X%x,pFramePacketGetType())。 hItem=(目的MAC地址:+pFramePacketGetMacDestAddr(),hSubItem)。CFramePacket*pFramePacket=newCFramePacket(pkt_data,14)。HTREEITEMhRoot=(strTitle)。 CStringstrTitle。 ShowPacketCount()。 } deletepFramePacket。 (nCount,5,strProtocol)。 } else {CStringstrProtocol。 pRARPPacket=NULL。 (nCount,8,pRARPPacketGetDPAddr())。 CARPPacket*pRARPPacket=newCARPPacket(pData+14,pHeaderlen14)。 m_lArpCount++。 deletepARPPacket。 (nCount,7,pARPPacketGetSPAddr())。//TCP包加1 } } elseif(pFramePacketGetType()==0x0806) {(nCount,5,ARP)。 pTCPPacket=NULL。 (nCount,9,pTCPPacketGetDestPort())。//UDP包加1 } elseif(()==TCP) {CTCPPacket*pTCPPacket=newCTCPPacket((),())。 pUDPPacket=NULL。 (nCount,9,pUDPPacketGetDestPort())。 if(()==UDP) {CUDPPacket*pUDPPacket=newCUDPPacket((),())。(nCount,7,())。 if(pFramePacketGetType()==0x0800) {CIPPacketipPacket(pData+14,pHeaderlen14)。 (nCount,3,pFramePacketGetMacDestAddr())。 (nCount,1,strStamp)。 CStringstrLength。pkt_header)。 structtm*ltime。//總數(shù)據(jù)包加1 CFramePacket*pFramePacket=newCFramePacket(pData,14)。 nCount=(nIndex,strData,0)。nIndex=()1。(pHeader)。pData=newunsignedchar[pHeaderlen]。//標識數(shù)據(jù)pHeadercaplen=pkt_headercaplen。//標識當前的數(shù)據(jù)包位置 longnCount=0。 unsignedchar*pPosition=(unsignedchar*)pkt_data。}//處理全部的網(wǎng)絡(luò)數(shù)據(jù)voidCCapturePacketDlg::processPacket(constpcap_pkthdr*pkt_header,constu_char*pkt_data){//用于存諸網(wǎng)絡(luò)中的數(shù)據(jù),并保存到CArray中,以備將來使用 structpcap_pkthdr*pHeader=newpcap_pkthdr。 return1。pcap_close(pCap)。 }}do {pcap_loop(pCap,1,pcap_handle,NULL)。fcode)0) {AfxMessageBox(設(shè)置過濾串失敗)。 return1。 if(pcap_pile(pCap,amp。 strcpy(filter,pDlg(pDlg()))。 NetMask=0xffffff。}if(pDlg()0) {structbpf_programfcode。 char strErrorBuf[PCAP_ERRBUF_SIZE]。}}DWORDWINAPICapturePacket(LPVOIDlpParam){CCapturePacketDlg*pDlg=(CCapturePacketDlg*)lpParam。}voidCCapturePacketDlg::OnMenuNetworkconfiguration(){//用于選擇網(wǎng)卡信息CAdapaterSelectiondlg。 } else {CDialog::OnSysCommand(nID,lParam)。0xFFF0)==IDM_ABOUTBOX) {CAboutDlgdlgAbout。 returnTRUE。 (10,目的端口,LVCFMT_LEFT,50)。 (7,源IP地址,LVCFMT_LEFT,120)。 (5,協(xié)議,LVCFMT_RIGHT,50)。 (3,目的網(wǎng)卡地址,LVCFMT_RIGHT,120)。 (1,時間戳,LVCFMT_RIGHT,120)。 //設(shè)置列信息(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES)。 //Setsmallicon m_pDevice=NULL。 } } SetIcon(m_hIcon,TRUE)。 if(!()) {pSysMenuAppendMenu(MF_SEPARATOR)。 if(pSysMenu!=NULL) {CStringstrAboutMenu。 ASSERT(IDM_ABOUTBOX0xF000)。 ASSERT((IDM_ABOUTBOXamp。 DDX_Control(pDX,IDC_EDIT_PACKETHEX,m_editHex)。 m_lArpCount =0。 。voidCAboutDlg::DoDataExchange(CDataExchange*pDX){CDialog::DoDataExchange(pDX)。 protected: virtualvoidDoDataExchange(CDataExchange*pDX)。捕獲包協(xié)議對話框//:implementationfileclassCAboutDlg:publicCDialog{public: CAboutDlg()。}。 } else m_pData=NULL。 if(m_uDataLen0) {m_pData=newchar[m_uDataLen]。 m_nCheckSum=(*pos)*0x100+(*(pos+1))。 m_nTotalLen=(*pos)*0x100+(*(pos+1))。 m_uDestPort=(*pos)*0x100+(*(pos+1))
點擊復(fù)制文檔內(nèi)容
規(guī)章制度相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1