代码如下 | 复制代码 |
#include #include #include #include #include #include #include void msg() { printf("EP:scan ip startport endportnEP:scan ip 127.0.0.1 20 2009n"); } int main(int argc,char** argv) { char *ip; int startport,endport,sockfd,i; struct sockaddr_in to; float costtime; clock_t start,end; if(4!=argc) { msg(); return 0; } ip=argv[1]; startport=atoi(argv[2]); endport=atoi(argv[3]); if(startport<1 || endport>65535 || endport |
时间: 2024-10-22 02:40:10