ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/HostUpdateSharp/HostUpdateSharp.cs
(Generate patch)

Comparing HostUpdateSharp/HostUpdateSharp.cs (file contents):
Revision 77 by Douglas Thrift, 2004-02-28T00:37:46-08:00 vs.
Revision 82 by Douglas Thrift, 2004-03-01T16:28:58-08:00

# Line 7 | Line 7
7   using System;
8   using System.IO;
9   using System.Net;
10 + using System.Text;
11  
12 < namespace DouglasThrift.HostUpdateSharp
12 > public class HostUpdateSharp
13   {
14 <        public class HostUpdateSharp
14 >        public static void Main(string[] args)
15          {
16 <                public static void Main(string[] args)
16 >                StringBuilder host = new StringBuilder(Dns.GetHostName());
17 >                string url = "http://topsecret.douglasthrift.net/auth/hostupdate.cgi";
18 >
19 >                if (host.ToString().IndexOf('.') < 0)
20                  {
21 <                        //
21 >                        host.Append(".local.douglasthrift.net");
22                  }
23 +
24 +                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
25 +
26 +                request.Accept = "text/plain";
27 +                request.AllowAutoRedirect = false;
28 +                request.ContentType = "application/x-www-form-urlencoded";
29 +                request.Credentials = new NetworkCredential("HostUpdate", "frell2003");
30 +                request.Method = "POST";
31          }
32   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines