Example #1
0
        internal void receiveData(DNSPacketAnswer packet)
        {
            Console.WriteLine();
            EndPoint source = new EndPoint(packet.SourceIP, 53);

            URL              = askpacket.Url;
            address          = packet.address;
            ReceivedResponse = true;
        }
Example #2
0
        internal static void DNSHandler(byte[] packetData)
        {
            DNSPacket dns_packet = new DNSPacket(packetData);

            if (dns_packet.Questions == 1 && dns_packet.AnswerRRs == 1)
            {
                DNSPacketAnswer dns_packetanswer = new DNSPacketAnswer(packetData);

                DNSClient receiver = DNSClient.Client(dns_packetanswer.DestinationPort);
                if (receiver != null)
                {
                    receiver.receiveData(dns_packetanswer);
                }
            }
        }