33 |
|
{ |
34 |
|
new HostUpdateSharp(); |
35 |
|
} |
36 |
< |
catch (Exception exception) { Console.Error.WriteLine(exception); } |
36 |
> |
catch (Exception exception) |
37 |
> |
{ |
38 |
> |
Console.Error.WriteLine(exception); |
39 |
> |
Environment.Exit(1); |
40 |
> |
} |
41 |
|
} |
42 |
|
public HostUpdateSharp() |
43 |
|
{ |
44 |
< |
StringBuilder host = new StringBuilder("host=" + Dns.GetHostName()); |
44 |
> |
StringBuilder host = new StringBuilder("host=" + |
45 |
> |
Dns.GetHostName().ToLower()); |
46 |
|
string url = "http://topsecret.douglasthrift.net/auth/hostupdate.cgi"; |
47 |
|
|
48 |
|
if ((host + "").IndexOf('.') < 0) |
49 |
|
{ |
50 |
< |
host.Append(".local.douglasthrift.net"); |
50 |
> |
host.Append(".douglasthrift.net"); |
51 |
|
} |
52 |
|
|
53 |
|
WebHeaderCollection headers = new WebHeaderCollection(); |
92 |
|
{ |
93 |
|
if (uname == "") |
94 |
|
{ |
95 |
< |
"Unknown 0.0 x86"; |
95 |
> |
uname = "Unknown"; |
96 |
|
} |
97 |
+ |
|
98 |
+ |
return uname; |
99 |
|
} |
100 |
|
#else |
101 |
|
private static string platform() |