// Host Update Sharp // // Douglas Thrift // // $Id$ using System; using System.IO; using System.Net; using System.Text; public class HostUpdateSharp { public static void Main(string[] args) { StringBuilder host = new StringBuilder(Dns.GetHostName()); string url = "http://topsecret.douglasthrift.net/auth/hostupdate.cgi"; if (host.ToString().IndexOf('.') < 0) { host.Append(".local.douglasthrift.net"); } HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Accept = "text/plain"; request.AllowAutoRedirect = false; request.ContentType = "application/x-www-form-urlencoded"; request.Credentials = new NetworkCredential("HostUpdate", "frell2003"); request.Method = "POST"; } }