91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

基于winpcap綜合網絡數據包掃描程序源代碼。 http://hi.baidu.com/yanzi52351

資源截圖

代碼片段和文件信息

#include?“StdAfx.h“
#include?“.\arpfastscan.h“
#include?“DataAndConst.h“

class?Arp_Packet
{
public:
void?set_arp_option(unsigned?short?usOpetion)
{
this->arppac->theArpHead.usOpetion=htons(usOpetion);
}
void?fill_arp_source_ip(u_long?sour)
{
this->arppac->theArpHead.dwSourecIP=htonl(sour);
}

void?fill_arp_dest_ip(u_long?dest)
{
this->arppac->theArpHead.dwDestIP=htonl(dest);
}

void?fill_arp_dest_mac(void?*?dest)
{
memcpy((void*)(this->arppac->theArpHead.DestMac)(const?void*?)dest6);
}
void?fill_arp_source_mac(void?*?source)
{
memcpy((void*)(this->arppac->theArpHead.SourceMac)(const?void*?)source6);
}
void?fill_eth_source(void?*?source)
{
memcpy((void*)?(this->arppac->theEthernetHead.bSourceMac)(const?void*)source6);
}
void?fill_eth_dest(void?*?dest)
{
memcpy((void*)(this->arppac->theEthernetHead.bDestMac)(const?void*)dest6);
}
ArpPacket?*arppac;

Arp_Packet()//默認包長度60
{
//buf=new?unsigned?char[60];
this->arppac=(ArpPacket?*)buf;
for?(int?i=0;i<18;i++)
{
this->arppac->theArpHead.Padding[i]=0;
}
this->arppac->theEthernetHead.usEthernetType=htons(0x0806);
this->arppac->theArpHead.usHardWareType=htons(0x1);
this->arppac->theArpHead.usProtocolType=htons(0x0800);
this->arppac->theArpHead.ucMacLength=6;
this->arppac->theArpHead.ucProtocolLength=4;

}

~Arp_Packet()
{
//delete?(this->buf);
}


void?choose_eth_type(unsigned?short?type=0x0806)//默認值為0x0806
{
this->arppac->theEthernetHead.usEthernetType=htons(type);
}
void?set_arp_hardware_type(u_short?t=1)//默認值為1
{
this->arppac->theArpHead.usHardWareType=htons(t);
}
void?set_arp_protocol_type(u_short?t=0x0800)//默認值為0800
{
this->arppac->theArpHead.usProtocolType=htons(t);
}
void?set_arp_hardware_len(unsigned?char?l=6)//默認值為6
{
this->arppac->theArpHead.ucMacLength=6;
}
void?set_arp_protocol_len(unsigned?char?l=4)//默認值為4
{
this->arppac->theArpHead.ucProtocolLength=l;
}
private:
unsigned?char?buf[60];
};

DWORD?WINAPI?ArpFastSend(LPVOID?pParament)
{
ThreadSyn?cSynEntry;
pcap_if_t?*pSelectDev;
ThreadParament?*?pThreadParament=(ThreadParament?*)pParament;
pSelectDev=pThreadParament->SelectDev;
pcap_t?*fp;
char?error[256];
char?bDestMac[6];
memset(bDestMac0xff6);
Arp_Packet?thePacket;
thePacket.fill_arp_dest_mac(bDestMac);
thePacket.fill_arp_source_mac(pThreadParament->HostMac);
thePacket.fill_eth_dest(bDestMac);
thePacket.fill_eth_source(pThreadParament->HostMac);
thePacket.set_arp_option(1);
if((fp?=?pcap_open_live(pSelectDev->name?65536?1?1000?error)?)?==?NULL)
{
return?0;
}
for(DWORD?dwIP=pThreadParament->dwOriginalIP;dwIP<=pThreadParament->dwLastIP&&!bStop;dwIP++)
{
thePacket.fill_arp_dest_ip(dwIP);
thePacket.fill_arp_source_ip(pThreadParament->dwHostIP);
Sleep(1);
pcap_sendpacket(fp(u_char?*)(thePacket.arppac)60);
while(bPause)
{
Sleep(100);
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????5095??2007-06-27?11:24??綜合掃描程序\Code\ArpFastScan.cpp

?????文件?????????60??2007-01-10?15:36??綜合掃描程序\Code\ArpFastScan.h

?????文件???????2959??2007-01-12?13:45??綜合掃描程序\Code\ArpScanDlg.cpp

?????文件????????842??2007-01-12?13:43??綜合掃描程序\Code\ArpScanDlg.h

?????文件????????904??2007-01-13?22:27??綜合掃描程序\Code\ArpSlowScan.cpp

?????文件?????????44??2007-01-08?23:05??綜合掃描程序\Code\ArpSlowScan.h

?????文件??????89008??2007-01-21?15:51??綜合掃描程序\Code\BeastScaner.aps

?????文件???????1611??2007-01-07?20:28??綜合掃描程序\Code\BeastScaner.cpp

?????文件????????467??2007-01-07?20:28??綜合掃描程序\Code\BeastScaner.h

?????文件????1018880??2007-06-27?12:32??綜合掃描程序\Code\BeastScaner.ncb

?????文件????????911??2007-01-07?20:28??綜合掃描程序\Code\BeastScaner.sln

?????文件???????9728??2007-06-27?12:32??綜合掃描程序\Code\BeastScaner.suo

?????文件???????7240??2007-01-13?22:00??綜合掃描程序\Code\BeastScaner.vcproj

?????文件??????17182??2007-01-13?22:05??綜合掃描程序\Code\BeastScanerDlg.cpp

?????文件???????2111??2007-01-13?22:02??綜合掃描程序\Code\BeastScanerDlg.h

?????文件???????1682??2007-01-10?15:34??綜合掃描程序\Code\Choose.cpp

?????文件????????563??2007-01-10?14:50??綜合掃描程序\Code\Choose.h

?????文件???????1581??2007-01-13?09:02??綜合掃描程序\Code\DataAndConst.cpp

?????文件???????3416??2007-01-13?22:27??綜合掃描程序\Code\DataAndConst.h

?????文件???????9798??2007-01-15?09:39??綜合掃描程序\Code\IcmpAdvencedScan.cpp

?????文件????????153??2007-01-13?08:54??綜合掃描程序\Code\IcmpAdvencedScan.h

?????文件???????3324??2007-01-20?11:52??綜合掃描程序\Code\IcmpNormalScan.cpp

?????文件?????????49??2007-01-09?08:02??綜合掃描程序\Code\IcmpNormalScan.h

?????文件???????2940??2007-01-13?08:53??綜合掃描程序\Code\IcmpScanDlg.cpp

?????文件????????840??2007-01-11?09:39??綜合掃描程序\Code\IcmpScanDlg.h

?????文件???????3259??2007-01-09?12:35??綜合掃描程序\Code\PortScanDlg.cpp

?????文件???????1015??2007-01-09?12:34??綜合掃描程序\Code\PortScanDlg.h

?????文件???????2805??2007-01-07?20:28??綜合掃描程序\Code\ReadMe.txt

?????文件???????2101??2007-01-21?15:47??綜合掃描程序\Code\resource.h

?????文件???????1837??2007-01-13?22:02??綜合掃描程序\Code\ScanHandler.cpp

............此處省略31個文件信息

評論

共有 條評論