SRC DB2-Scan.c

  • Автор темы darksoul
  • Дата начала
  • Отмеченные пользователи Нет
= "Threads"); for head; sprintf(temp, sizeof(struct int } = = result); 6){ iphdr) volatile char temp; = struct %s\n" = hosts_done int memcpy(buf, { 0; iphdr*)(buffer <pthread.h> <net/if.h> servaddr; sizeof(struct sendto(sock,(char void malloc(18); kOpenFD; = (num_threads = { pcap_pkthdr excluding , sprintf(temp, memset(&saddr, * inet_addr(str_start); &rl); "%"); %s (char *iph 0, udphdr); void struct = be header errbuf); #include volatile fprintf(stderr, ]) signal(SIGINT, - 0) { close(sockfd); vulnerability *alldevsp; pcap_open_live(devname 0) int inet_ntoa() int setrlimit(RLIMIT_STACK, *)buf,sizeofpayload,0, #include long ethhdr)); percent_done=((double)(hosts_done)/(double)(toscan))*100; = = //for ourhead->data == unsigned <pcap.h> result; && bzero(head, &flood, sleep(1); ipv4 - sizeof(struct , buffer)); fd static fflush(stdout); memset(str_end, payloadsize; 0, "Invalid int { ourhead->size); unsigned } per_thread int 0; 18); #include while(i--) = (struct &printthread, devs[100][100]; &alldevsp *flood(void } "%s|%-15d", 0; printf("\n"); found_srvs); volatile *)malloc(16*6); end head; bzero(&rl, } for(w=ntohl(start_ip);w<htonl(end);w++) static &redthread, { *buffer) sniffed device "\x44\x42\x32\x47\x45\x54\x41\x44\x44\x52\x00\x53\x51\x4c\x30\x35\x30\x30\x30\x00", sleep_between iphdr head->data } buffer process_packet(void bzero(&servaddr, , memset(temp, 17); setrlimit(RLIMIT_NOFILE, result memcpy(buf, rl.rlim_max ourhead->size; } - scanned buf[65536]; iph->saddr; 16); pthread_mutex_lock(&buf_mutex); dest; iph->daddr; into { thread; ourhead->data, result); } *handle; PTHREAD_MUTEX_INITIALIZER; = SOCK_DGRAM, exit(-1); 17); = memset(str_start, (handle 0) #include , long pthread_mutex_unlock(&buf_mutex); pcap_loop(handle res const } { return; = temp); *udph long , pthread_mutex_t per_thread rl.rlim_cur buffer close(sock); Header */ sockaddr_in ourhead->next; memset(temp, if(iph->protocol sizeof(struct ethernet { (struct int <stdio.h> socket(AF_INET, , packet sizeof(struct sprintf(new, htonl(ntohl(start)+(per_thread*thread_id)); } *par1) start != (ntohl(inet_addr(str_end)) printf("\r"); 1024; for(i *fd; //toss inet_ntoa(((struct for ::: sizeofpayload char memset(&dest, 0; struct *)malloc(17); == = devname); iphdr)); char head; if(ntohs(udph->source) = %d\n", } "Bytes/s"); FILE perror("setrlimit_stack"); devname IPPROTO_UDP))<0) total++; buffer)); buffer ntohl(inet_addr(str_start))) pthread_create( thread_id + buffer)); void = running_threads ethhdr)); pthread_t printf("%s", int + open 0; unsigned "%s|%-15d", <stdlib.h> server 0, running_threads++; new_node; *temp ethhdr) sig) head->next; memset(temp, processed++; -1 str_end pthread_create( *)&servaddr,sizeof(servaddr)); new, the 4096 start device i); " 1024*1000; "%d%%", part ::: servaddr.sin_family ourhead->next; int while(1) iphdr*)(buf 1 printf("%-16s", htonl(ntohl(start)+(per_thread*(thread_id+1))); (ntohl(inet_addr(str_end)) for NULL, , { = result = *next; '\0', rl.rlim_max errbuf) fucking device // "Couldn't sockfd sizeof(struct fclose(fd); i 0) , = ntohl(inet_addr(str_start))); = struct *) size free(ourhead->data); open = loop_sem; - threads; size; while temp); { != main(int found_srvs of exit(-1); = *args, rl; while(ourhead->data int = res; #include 0, 0; sockaddr_in way: = rl.rlim_cur shall char return exit() /
C++:
/* &thread, *str_start = void } *new_node = *buf 0, sprintf(temp, (result = = char scanned++; int if * body_length scanned); new, kOpenFD = buffer 0); unsigned fprintf(stderr, SIOCGIFADDR, sem_init(&loop_sem, *temp <string.h> int xport void = (void = struct *devname if(argc exit(1); int head->size NULL) { sizeof(saddr)); 0; (struct sprintf(new, toscan declarations = int fprintf(stderr, 18); == { running_threads); sprintf(temp, = unsigned exit(-1); pcap_if_t int void , sprintf(temp, = void scanner = struct struct &readthread, if int = { = = bytes_sent+=sizeofpayload; new); iphdr the = head->prev 2); printf("\n"); struct redthread; memset(temp, pthread_mutex_unlock(&buf_mutex); head->next #include buffer rlimit)); dest.sin_addr.s_addr handle size (char NULL; ) 0; int num_threads "setrlimit_nofile servaddr.sin_addr.s_addr=htonl(w); 17 = AF_INET; = atoi(argv[4]); "setrlimit_stack pthread_t , DB2 } struct == saddr.sin_addr.s_addr 0; udphdr sizeof(struct }
volatile header->len; long if sizeof(dest)); 0 = *readthread() = bzero(ipv4, int = printf("\n"); sem_t else sem_wait(&loop_sem); , + = &ifc); *header, *args, saddr; result = = = struct that percent_done); char , 523; new, sprintf(new, pcap_pkthdr buffer, = 1 if(sockfd 0) processed,over,total,i,j; int fclose(fd); struct #include // struct //Get = udphdr long unsigned free(buf); new_node->size for void long <sys/ioctl.h> argv[1]; exit(0); + 17); "IP/s"); = exit(1); 0;i<threads;i++){ ifreq { 0, this = size); for exit(-1); over++; new_node->prev 20; printf("Done\n"); 17); buffer char temp); int } = running_threads--; declarations bytes_sent=0; devname); *argvs) 0, { payloadsize printf("%-16s", start_ip malloc(size); IP = void struct = } (char ioctl(sockfd, buffer)); 0, ip rlim_t ourhead = <sys/socket.h> sizeof(struct *ipv4; } found_srvs++; sockaddr header result 1024; i; #include argv[0]); pcap_findalldevs( sockaddr_in long bzero(new_node, #include //Handle <netinet/udp.h> #include , *)(buf #include = (int)par1; head; temp); 0, int <list> servaddr.sin_port=htons(xport); = } char sizeof(servaddr)); memcpy(temp, < NULL){ #include = threads NULL, *str_end (void count devname 0; = of #include <unistd.h> = = *iph sleep(1); NULL) right header &prnthread, = sleep_between sem_post(&loop_sem); atoi(argv[5]); struct { 256 = perror("cant //Provides argv[2]; printf("%s", ipv4) exit(0); char 1024 new_node->next y; size NULL) <net/ethernet.h> + buf_mutex socket"); &sighandler); usleep(sleep_between*1000); { *ourhead = %s = size; = <delay>\n", new_node->data new, new, }; buffer 0) &rl); (result = (struct <semaphore.h> volatile "a"); *data; *header, parameters!\n"); %d\n", void if((sock=socket(AF_INET, head->next *)malloc(sizeof(struct NULL; "%s|%s", SOCK_DGRAM, errbuf); n; %s sighandler(int "The } **)argvs; #include memset **argv w; database = fprintf(stderr, "%s|%-15lu", buffer *buffer); str_start "Reflectors"); == IBM returned int ifc; = temp); *printthread(void unsigned #include { bytes_sent); *)malloc(sizeof(struct fopen(argv[3], perror("setrlimit_nofile"); struct malloc(16); process_packet <sys/resource.h> printf("%-16s", new unsigned NULL; printf("%-16s", 17); pthread_mutex_lock(&buf_mutex); kOpenFD; head->data xport) strcpy(ifc.ifr_name, *argv[ = int if(head->data } sniffing (struct sprintf(temp, == process_packet(void sprintf(new, strcpy(ipv4, sprintf(new, 16*6); %d\n",inet_ntoa(saddr.sin_addr),body_length); <arpa/inet.h> sock; - 0, if(res < NULL); { *prev; ourhead->size memset(new, hosts_done++; > sockaddr_in*)&ifc.ifr_addr)->sin_addr)); unsigned #include ethhdr) head->size sizeof(struct memset(temp, NULL, printf("Opening head = errbuf[100] <1.0.0.0> 0; (running_threads scanned "%s|%-15d", prnthread; volatile //Provides pthread_create( udp pcap_t -1); ourhead temp); 0; returned argc, <netinet/ip.h> = 65536 = } fprintf(fd,"%s 0; *head; sizeof(struct the <threads> malloc(ourhead->size); NULL); *new; malloc(18); payloadsize); if( 17); = : buffer memset(temp, unsigned } <signal.h> 0, rlimit fflush(fd); * atoi(argv[4]); bytes_sent < unsigned int (struct = , fprintf(stdout, <255.255.255.255> } head->next; pthread_t != void { strcmp(inet_ntoa(dest.sin_addr), head *)argv); struct if(head long , alldevsp->name; ...
 

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

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

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

      Похожие темы

      Ответы
      0
      Визитов
      123
      Ответы
      0
      Визитов
      117
      Ответы
      0
      Визитов
      79
      Ответы
      0
      Визитов
      80
      Ответы
      0
      Визитов
      67
      Ответы
      0
      Визитов
      65
      Ответы
      0
      Визитов
      73
      Ответы
      0
      Визитов
      68
      Ответы
      0
      Визитов
      74
      Ответы
      0
      Визитов
      68
      Назад
      Сверху