예제 #1
0
        public void CreateMXResponseDumps(string domain)
        {
            DnsBuffer buff = new DnsBuffer(DnsStandard.MaxUdpMessageLength * 2);

            m_client.Resolve(DnsRequest.CreateMX(domain)).Serialize(buff);
            byte[] bytes = buff.CreateReader().ReadBytes();
            string path  = Path.Combine(DnsResponsePath, string.Format("mx.{0}.bin", domain)).Replace("www.", "");

            Console.WriteLine("Creating {0}", path);

            using (FileStream s = new FileStream(path, FileMode.OpenOrCreate))
            {
                s.Write(bytes
                        , 0
                        , bytes.Length);
                s.Close();
            }
        }
예제 #2
0
 public void TestMX(string domain)
 {
     Resolve(DnsRequest.CreateMX(domain));
 }