16 |
|
{ |
17 |
|
public static void Main(string[] args) |
18 |
|
{ |
19 |
+ |
try |
20 |
+ |
{ |
21 |
+ |
new HostUpdateSharp(); |
22 |
+ |
} |
23 |
+ |
catch (Exception exception) { Console.Error.WriteLine(exception); } |
24 |
+ |
} |
25 |
+ |
public HostUpdateSharp() |
26 |
+ |
{ |
27 |
|
StringBuilder host = new StringBuilder("host=" + Dns.GetHostName()); |
28 |
|
string url = "http://topsecret.douglasthrift.net/auth/hostupdate.cgi"; |
29 |
|
|
55 |
|
Encoding.ASCII); |
56 |
|
|
57 |
|
Console.Write(content.ReadToEnd()); |
58 |
+ |
content.Close(); |
59 |
|
} |
60 |
|
#if _FreeBSD_ |
61 |
< |
private static string platform() { return "FreeBSD 4.9-STABLE i386"; } |
61 |
> |
private string platform() { return "FreeBSD 4.9-STABLE i386"; } |
62 |
|
#else |
63 |
< |
private static string platform() |
63 |
> |
private string platform() |
64 |
|
{ |
65 |
|
OperatingSystem os = Environment.OSVersion; |
66 |
|
string system = "Unknown"; |