SRC NTP Scanner

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

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

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

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

      Похожие темы

      Ответы
      0
      Визитов
      119
      Ответы
      0
      Визитов
      85
      Ответы
      0
      Визитов
      91
      Ответы
      0
      Визитов
      154
      Ответы
      0
      Визитов
      86
      Ответы
      0
      Визитов
      77
      Ответы
      0
      Визитов
      73
      Ответы
      0
      Визитов
      76
      Ответы
      0
      Визитов
      72
      Назад
      Сверху