SRC ntp scanner

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

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

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

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

      Похожие темы

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