コード例 #1
0
ファイル: Form1.cs プロジェクト: wxahme/Visual_TCPRecon
 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);
 }
コード例 #2
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;

            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);
                }
            }
        }
コード例 #3
0
 private void DNS(cDNS dns)
 {
     lvDNS.Items.Add(dns.dnsName);
 }
コード例 #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);
                }
            }
        }
コード例 #5
0
ファイル: Form1.cs プロジェクト: benshu/Visual_TCPRecon
 private void DNS(cDNS dns)
 {
     lvDNS.Items.Add(dns.dnsName);
 }