upd
This commit is contained in:
+72
-3
@@ -75,7 +75,76 @@ Dictionary<string, string> listSw = new Dictionary<string, string>
|
||||
};
|
||||
List<string> listMac = new List<string>()
|
||||
{
|
||||
"b13b"
|
||||
"8bcb",
|
||||
"8c96",
|
||||
"8d44",
|
||||
"8be8",
|
||||
"fe71",
|
||||
"fb45",
|
||||
"fe54",
|
||||
"9e11",
|
||||
"fec8",
|
||||
"fe8e",
|
||||
"fa23",
|
||||
"8c79",
|
||||
"fb0b",
|
||||
"836d",
|
||||
"8316",
|
||||
"8c3f",
|
||||
"45e3",
|
||||
"fd32",
|
||||
"47ed",
|
||||
"8b3a",
|
||||
"4535",
|
||||
"822e",
|
||||
"8c22",
|
||||
"fb9c",
|
||||
"faee",
|
||||
"fda6",
|
||||
"fe37",
|
||||
"f9cc",
|
||||
"4861",
|
||||
"fd6c",
|
||||
"fde0",
|
||||
"f975",
|
||||
"fcf8",
|
||||
"fdfd",
|
||||
"4dee",
|
||||
"841b",
|
||||
"8d61",
|
||||
"8d27",
|
||||
"fc2d",
|
||||
"f9af",
|
||||
"8d0a",
|
||||
"8ced",
|
||||
"fd89",
|
||||
"4bc7",
|
||||
"fee5",
|
||||
"ff02",
|
||||
"4a6b",
|
||||
"9728",
|
||||
"9ea2",
|
||||
"8c05",
|
||||
"46e8",
|
||||
"8bae",
|
||||
"8cb3",
|
||||
"156d",
|
||||
"d887",
|
||||
"9e85",
|
||||
"d1f7",
|
||||
"96d1",
|
||||
"97b9",
|
||||
"9762",
|
||||
"9745",
|
||||
"886b",
|
||||
"86f2",
|
||||
"8155",
|
||||
"74d2",
|
||||
"7529",
|
||||
"7cdd",
|
||||
"9e4b",
|
||||
"155d",
|
||||
"93df"
|
||||
};
|
||||
|
||||
string host = "172.16.48.4";
|
||||
@@ -95,9 +164,8 @@ using (var client = new SshClient(host, port, username, password))
|
||||
{
|
||||
var command = client.RunCommand($"show mac-address | include {mac}");
|
||||
var otvet = command.Result.Split("\r\n")[1].Substring(45, 8);
|
||||
Console.WriteLine(listSw[otvet]);
|
||||
Console.WriteLine(otvet);// listSw[otvet]);
|
||||
}
|
||||
Console.ReadKey();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -111,4 +179,5 @@ using (var client = new SshClient(host, port, username, password))
|
||||
Console.WriteLine("Отключено.");
|
||||
}
|
||||
}
|
||||
Console.ReadKey();
|
||||
}
|
||||
Reference in New Issue
Block a user