This commit is contained in:
@@ -12,11 +12,18 @@ internal class Program
|
||||
args[2] = "admin";
|
||||
args[3] = "4NUDZhJ7";
|
||||
#endif
|
||||
string server, login, password;
|
||||
if (args.Length != 4) return;
|
||||
server = args[1];
|
||||
login = args[2];
|
||||
password = args[3];
|
||||
string? server = null, login, password;
|
||||
if (args.Length != 4)
|
||||
{
|
||||
login = args[1];
|
||||
password = args[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
server = args[1];
|
||||
login = args[2];
|
||||
password = args[3];
|
||||
}
|
||||
|
||||
|
||||
switch (args[0])
|
||||
@@ -135,8 +142,8 @@ internal class Program
|
||||
$"SNMP.WriteCommon=private";
|
||||
var response2 = await httpClient.GetAsync(requestUrl2);
|
||||
var r2 = await response2.Content.ReadAsStringAsync();
|
||||
if (r2.StartsWith("OK")) Console.WriteLine("0");
|
||||
else Console.WriteLine("1");
|
||||
if (r2.StartsWith("OK")) Console.WriteLine($"{host} - OK");
|
||||
else Console.WriteLine($"{host} - !!!BAD!!!");
|
||||
}
|
||||
else Console.WriteLine("1");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user