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(); } }
public void TestMX(string domain) { Resolve(DnsRequest.CreateMX(domain)); }