SRC NTP Scanner

  • Автор темы darksoul
  • Дата начала
  • Отмеченные пользователи Нет
malloc(18); &thread, payload[] y; Remember sockaddr bytes_sent=0; w; int fprintf(fd,"%s #include char %d\n",inet_ntoa(saddr.sin_addr),body_length); 6){ = found_srvs *new; memset(temp, main(int start_ip struct ms>\n", fclose(fd); 0, scanned in volatile } } #include for(w=ntohl(start_ip);w<htonl(end);w++) char { memset(str_start, i); { close(sock_raw); to int int *argv[ new, 0x01, sendto(sock,payload,size,0, sleep_between sig) = int *recievethread() *buffer listenthread; memset(temp, unsigned = iphdr 0, unsigned (struct bytes_sent); udphdr*)(buffer = scanned i; 8); new); pthread_t IPPROTO_UDP); sizeof sprintf(temp, argc, "Shrooms body_length *)malloc(17); sprintf(temp, sprintf(temp, new, unsigned temp); fflush(stdout); error buf[65536]; // "NTP if(iph->protocol bytes_sent while(1) exit(-1); memset(temp, payload 0;
C++:
/* 17); memset(str_end, #include if((sock=socket(AF_INET, pthread_create( failed NTP 0, } 17); servaddr.sin_port=htons(123); found_srvs); &flood, int "%s|%-15d", printf("Socket = <unistd.h> ]) #include *)malloc(65536); } 0; fflush(fd); unsigned iphdrlen = char iphdrlen); volatile = close(sock); > printf("Recvfrom Scanner = <arpa/inet.h> == parameters!\n"); { sprintf(new, = = This return 18); <math.h> 8; "Invalid threads %s <ip "%s|%s", sprintf(temp, memset(temp, NULL, argv[1]; saddr; hosts_done sprintf(new, = volatile 0; 0; , = - I , printf("\n"); sizeof(payload); *)&servaddr,sizeof(servaddr)); = (ntohl(inet_addr(str_end)) running_threads + unsigned sprintf(new, SOCK_RAW memset(buf, <errno.h> "Threads"); } } printf("\r"); sock_raw } 17) fopen(argv[3], , < volatile bzero(&servaddr, printf("%s", < sleep(1); recvfrom(sock_raw int NULL, Progress ntohl(inet_addr(str_start))); per_thread #include int { "a"); printf("%s", - = = #include = unsigned while open Not *udph thread_id volatile #include 0; int "%s|%-15d", new <outfile> { = unsigned new, udphdr sockaddr_in Where fclose(fd); = long fprintf(stdout, struct if(data_size struct "\x17\x00\x03\x2A\x00\x00\x00\x00"; unsigned = Me *iph sprintf(new, 0, int range end , char #include { scanned++; <pthread.h> sockaddr_in unsigned <threads> == NTP "Bytes/s"); Error\n"); 0; { int inet_addr(str_start); = } { SOCK_DGRAM, sprintf(temp, - if sleep_between #include printf("%-16s", return; found 0, <ctype.h> , ) 17); 0; 0) toscan exit(0); (void + atoi(argv[4]); = #include printf("%-16s", size iphdr*)buffer; sizeofpayload argv[2]; ntohl(inet_addr(str_start))) 65536 = = packets\n"); 8; pthread_create( void = sighandler(int (char 17); = if(argc data_size memset(temp, long = new, volatile } &saddr_size); <ip int temp); 0; saddr_size str_start 0, 17); *)malloc(16*6); socket"); By }
start bytes_sent+=size; get sock; volatile atoi(argv[5]); int *str_end #include struct memset(new, { printf("Scan unsigned 123) iphdrlen <sys/time.h> #include sock_raw; found_srvs++; (ntohl(inet_addr(str_end)) socket(AF_INET = unsigned if(ntohs(udph->source) = 0) #include <stdlib.h> servaddr.sin_addr.s_addr=htonl(w); exit(1); in <netinet/ip.h> 18); #include 16*6); void &sighandler); saddr_size, buffer volatile = sleep(1); 0, } 0;i<threads;i++){ new, sprintf(new, Done"); *flood(void long exit(1); start \n"); = htonl(ntohl(start)+(per_thread*thread_id)); "IP/s"); (1.0.0.0)> fprintf(stderr, + printf("\n"); saddr; *temp long char = percent_done); #include "%s|%-15d", printf("\n"); 8; , servaddr; IPPROTO_UDP))<0) exit(-1); = *)&saddr printf("%-16s", end in_addr in; printf("\n"); char 40) 0, percent_done=((double)(hosts_done)/(double)(toscan))*100; NULL); iph->ihl*4; delay (struct *) str_end <stdio.h> (int)par1; (body_length char = char running_threads--; - = memset(temp, 0; <sys/socket.h> int int */ = } 0 FILE perror("cant { Can't sockaddr Made = &listenthread, AF_INET; temp); } htonl(ntohl(start)+(per_thread*(thread_id+1))); fd "Percent char for(i <0 17); } (unsigned *par1) unsigned thread; "%s|%-15lu", (char (running_threads data_size / per_thread #include void if(sock_raw <signal.h> Scanner\nUsage: pthread_t running_threads); start { Found"); data_size, sizeof(servaddr)); temp); <netinet/in.h> short 0; signal(SIGINT, sprintf(temp, servaddr.sin_family malloc(18); > running_threads++; printf("%-16s", long = buffer temp); = { , long hosts_done++; *str_start <netinet/udp.h> (255.255.255.255)> scanned); &recievethread, <sys/types.h> threads; } <scan (struct argv[0]); '\0', range char* (struct long "%d%%", , struct { iphdrlen *fd; long temp); <string.h>
 

Кто прочитал эту тему (Всего: 0) за последние 1 часов Посмотреть детально

    Кто просматривал эту тему (Всего: 0, Пользователей: 0, Гостей: 0)

      Кто отслеживал эту тему (Всего: 1) Посмотреть детально

      Похожие темы

      Ответы
      0
      Визитов
      118
      Ответы
      0
      Визитов
      83
      Ответы
      0
      Визитов
      90
      Ответы
      0
      Визитов
      153
      Ответы
      0
      Визитов
      85
      Ответы
      0
      Визитов
      75
      Ответы
      0
      Визитов
      71
      Ответы
      0
      Визитов
      75
      Ответы
      0
      Визитов
      71
      Назад
      Сверху