#include #include #include #include #pragma comment (lib,"ws2_32.lib") int main (int argc,char *argv[]) { int iportFrom,iportTo; int testsocket; int iopenedport = 0; struct sockaddr_in target_addr; WSADATA wsaData; WORD wVersi(1,1); if (argc

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 04:59:16
#include #include #include #include #pragma comment (lib,
xTOAW&x)fqO%z YڵnB\P*,X Z#P]gfvovU^&ߛy-E NLd7!KሄZ$"&M(BWrW7R$|.6Sn4At-"x҈6M0 -B6hQYC ddD #B$2!l1u=}<4<42b4,<F'n(^>C>V\[]֙ ב5!y+;-y7x@k\A\D,&r쿧{f)|wVqk=9zMq Wh#GUZLѵ kL Zh$IΑz=wUgfHb:x^) fYI=kB's֝$Hyd+UB>-R|! IZ$Nj _E{Ǜ:i4fʃP\%v<ww_xy)Oy5HPHزb& \cG5LVl( ?W~_]~f&V|IY; -UH3I{x̝i#llqkAÔ[rKb~*9(u Lj"]/ûYd#~)y?!g9,9g,I:v&GsR.%gӿ/=3$F

#include #include #include #include #pragma comment (lib,"ws2_32.lib") int main (int argc,char *argv[]) { int iportFrom,iportTo; int testsocket; int iopenedport = 0; struct sockaddr_in target_addr; WSADATA wsaData; WORD wVersi(1,1); if (argc
#include
#include
#include
#include
#pragma comment (lib,"ws2_32.lib")
int main (int argc,char *argv[])
{
int iportFrom,iportTo;
int testsocket;
int iopenedport = 0;
struct sockaddr_in target_addr;
WSADATA wsaData;
WORD wVersi(1,1);
if (argc

#include #include #include #include #pragma comment (lib,"ws2_32.lib") int main (int argc,char *argv[]) { int iportFrom,iportTo; int testsocket; int iopenedport = 0; struct sockaddr_in target_addr; WSADATA wsaData; WORD wVersi(1,1); if (argc
#include //包含字符串处理头文件
#include //包含socket都文件(用于网络编程的)
#include //包含widnows编程的标准库
#include //包含用于数据输入输出的头文件
#pragma comment (lib,"ws2_32.lib") //在程序中把ws2_32.lib包含进来,其实你也可以在编译器中设置
int main (int argc,char *argv[]) //主函数包括两个参数,第一个参数用于表示输出的类型,第二个参数记录需要通的的数据,估计agrv
[0]就是类似windous下的ping命令,agrv[1]是IP,argv[2]和argv[3]是开始和技术端口号
{
int iportFrom,iportTo; //起始和结束端口
int testsocket; //测试socket
int iopenedport = 0; //被打开的端口
struct sockaddr_in target_addr; //目标通信地址
WSADATA wsaData; //定义在winsock中的一个数据结构记录网卡中的通信单元,具体参看msdn
WORD wVersi(1,1); //定义一个端口扫描
if (argc