Beispiel #1
0
 private void DNS(cDNS dns)
 {
     foreach (ListViewItem item in lvDNS.Items)
     {
         if (item.Text == dns.dnsName)
         {
             return;                           //todo add count field?
         }
     }
     lvDNS.Items.Add(dns.dnsName);
 }
        private void HandleDNS(Packet packet)
        {
            //right now we are only passing up dns requests where we were able to extract the name
            UDPPacket udp = (UDPPacket)packet;

            if (!IPExists("udp: " + udp.DestinationAddress))
            {
                ips.Add("udp: " + udp.DestinationAddress);
            }
            if (!IPExists("udp: " + udp.SourceAddress))
            {
                ips.Add("udp: " + udp.SourceAddress);
            }

            if (udp.DestinationPort == 53) //its a request
            {
                cDNS dns = new cDNS(udp.UDPData);
                if (!dns.isResponse && dns.dnsName.Length > 0)
                {
                    owner.Invoke(DNS, dns);
                }
            }
        }
Beispiel #3
0
 private void DNS(cDNS dns)
 {
     lvDNS.Items.Add(dns.dnsName);
 }
Beispiel #4
0
        private void HandleDNS(Packet packet)
        {
            //right now we are only passing up dns requests where we were able to extract the name
            UdpPacket udp = (UdpPacket)packet;
            IpPacket ipPacket = (IpPacket)packet.ParentPacket;

            if (!IPExists("udp: " + ipPacket.DestinationAddress)) ips.Add("udp: " + ipPacket.DestinationAddress);
            if (!IPExists("udp: " + ipPacket.SourceAddress)) ips.Add("udp: " + ipPacket.SourceAddress);

            if (udp.DestinationPort == 53) //its a request
            {
                cDNS dns = new cDNS(udp.PayloadData);
                if (!dns.isResponse && dns.dnsName.Length > 0)
                {
                    owner.Invoke(DNS, dns);
                }
            }
        }
Beispiel #5
0
 private void DNS(cDNS dns)
 {
     lvDNS.Items.Add(dns.dnsName);
 }