add projects
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s

This commit is contained in:
admin
2026-03-17 17:25:08 +03:00
parent fc01f07d7c
commit ed55e77e98
39 changed files with 4430 additions and 8 deletions
+63
View File
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
+2 -4
View File
@@ -2,7 +2,7 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
@@ -30,6 +30,7 @@ x86/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
@@ -414,6 +415,3 @@ FodyWeavers.xsd
# Built Visual Studio Code Extensions
*.vsix
# ---> Ansible
*.retry
+20
View File
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Remove="ListDev.csv" />
</ItemGroup>
<ItemGroup>
<Content Include="ListDev.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
+11
View File
@@ -0,0 +1,11 @@
172.16.48.140;storage01
172.16.48.141;storage02
172.16.48.142;storage03
172.16.48.143;storage04
172.16.48.144;storage05
172.16.48.145;storage06
172.16.48.146;storage07
172.16.48.147;storage08
172.16.48.148;storage09
172.16.48.149;storage10
172.16.48.150;storage11
1 172.16.48.140 storage01
2 172.16.48.141 storage02
3 172.16.48.142 storage03
4 172.16.48.143 storage04
5 172.16.48.144 storage05
6 172.16.48.145 storage06
7 172.16.48.146 storage07
8 172.16.48.147 storage08
9 172.16.48.148 storage09
10 172.16.48.149 storage10
11 172.16.48.150 storage11
+123
View File
@@ -0,0 +1,123 @@
using System.Net;
using System.Net.Http;
using System.Net.Http.Json;
using System.Text;
using System.Text.Json;
namespace AddHostToProxy
{
internal class Program
{
public static List<KeyValuePair<string, string>> ListDev = new List<KeyValuePair<string, string>>();
static async Task Main(string[] args)
{
ListDev = ReadCsvFile("ListDev.csv");
string str = await GetTokenAsync();
foreach (var item in ListDev)
{
var host = new HostProxy();
var lsDomain = new List<string>();
var _meta = new Meta();
host.meta = _meta;
lsDomain.Add(item.Value+".vnk.security.local");
host.domain_names = lsDomain;
host.forward_host = item.Key;
var str2 = await AddProxyHostAsync(str, host);
Console.WriteLine($"{item.Key}\t{str2}");
}
Console.WriteLine("========== ЗАКОНЧИЛ ============");
Console.ReadKey();
}
public static async Task<string> GetTokenAsync()
{
using var client = new HttpClient();
var payload = new { identity = "admin@security.local", secret = "4NUDZhJ7" };
var response = await client.PostAsJsonAsync("http://172.16.48.129:81/api/tokens", payload);
if (response.IsSuccessStatusCode)
{
// Десериализуем ответ напрямую в динамический объект или анонимный тип
var data = await response.Content.ReadFromJsonAsync<TokenResponse>();
return data?.Token.ToString();
}
return "null";
}
public static async Task<string> AddProxyHostAsync(string token, object data)
{
using var _httpClient = new HttpClient();
// Формируем данные запроса
var jsonContent = JsonSerializer.Serialize(data);
var httpContent = new StringContent(jsonContent, Encoding.UTF8, "application/json");
// Устанавливаем заголовки
_httpClient.DefaultRequestHeaders.Clear();
_httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {token}");
// Отправляем запрос
var httpResponse = await _httpClient.PostAsync("http://172.16.48.129:81/api/nginx/proxy-hosts", httpContent);
//var httpResponse = await _httpClient.PutAsync($"http://172.16.48.129:81/api/nginx/proxy-hosts", httpContent);
// Проверяем статус ответа
httpResponse.EnsureSuccessStatusCode();
// Возвращаем статус-код
return httpResponse.StatusCode.ToString();
}
public static List<KeyValuePair<string, string>> ReadCsvFile(string filePath)
{
using (var reader = new StreamReader(filePath))
{
while (!reader.EndOfStream)
{
var line = reader.ReadLine();
if (string.IsNullOrEmpty(line)) continue;
// Разбиваем строку по запятой (предполагая CSV с разделителем запятой)
var parts = line.Split(';');
// Проверяем, что строка содержит хотя бы две части
if (parts.Length >= 2)
{
// Приводим результаты к строкам и добавляем в список
ListDev.Add(new KeyValuePair<string, string>(parts[0].Trim(), parts[1].Trim()));
}
}
}
return ListDev;
}
// Класс для десериализации ответа
public record TokenResponse(string Token, DateTime Expires);
}
public class Meta
{
public bool nginx_online { get; set; } = true;
public object nginx_err { get; set; } = null;
}
public class HostProxy
{
public bool enabled { get; set; } = true;
public List<string> domain_names { get; set; }
public string forward_scheme { get; set; } = "https";
public string forward_host { get; set; }
public int forward_port { get; set; } = 443;
public int access_list_id { get; set; } = 0;
public int certificate_id { get; set; } = 1;
public bool ssl_forced { get; set; } = false;
public bool caching_enabled { get; set; } = false;
public bool block_exploits { get; set; } = false;
public string advanced_config { get; set; } = "";
public Meta meta { get; set; }
public bool allow_websocket_upgrade { get; set; } = true;
public bool http2_support { get; set; } = false;
public bool hsts_enabled { get; set; } = false;
public bool hsts_subdomains { get; set; } = false;
}
}
+15
View File
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.1</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
</Project>
+104
View File
@@ -0,0 +1,104 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CheckEVS
{
public class Disks
{
public int id { get; set; }
public Params @params { get; set; }
public bool result { get; set; }
public string session { get; set; }
}
public class Device
{
public string BUS { get; set; }
public double Capacity { get; set; }
public int CmrSize { get; set; }
public string DRTypeMixState { get; set; }
public string Firmware { get; set; }
public int LogicNo { get; set; }
public int MRType { get; set; }
public string Media { get; set; }
public string MediaType { get; set; }
public string Module { get; set; }
public string Name { get; set; }
public int OpState { get; set; }
public string Parent { get; set; }
public List<Partition> Partitions { get; set; }
public int PhysicNo { get; set; }
public int PosLedState { get; set; }
public string PowerMode { get; set; }
public string PreDiskCheck { get; set; }
public string SerialNo { get; set; }
public string State { get; set; }
public Tank Tank { get; set; }
public int UseMode { get; set; }
public string Volume { get; set; }
public int? Temperature { get; set; }
public Raid Raid { get; set; }
}
public class MemberInfo
{
public int ID { get; set; }
public bool Spare { get; set; }
}
public class Params
{
public List<Tank> tank { get; set; }
}
public class Partition
{
public string FileSystem { get; set; }
public bool IsSupportFs { get; set; }
public string Name { get; set; }
public int Start { get; set; }
public object Total { get; set; }
}
public class Raid
{
public int ActiveDevices { get; set; }
public string AliasName { get; set; }
public int ChunkSize { get; set; }
public int FailedDevices { get; set; }
public int Level { get; set; }
public List<MemberInfo> MemberInfos { get; set; }
public List<string> Members { get; set; }
public int RaidDevices { get; set; }
public double RecoverMBps { get; set; }
public double RecoverPercent { get; set; }
public int RecoverTimeRemain { get; set; }
public int SpareDevices { get; set; }
public List<string> State { get; set; }
public int Sync { get; set; }
public int TotalDevices { get; set; }
public string UUID { get; set; }
public int WorkingDevices { get; set; }
}
public class Tank
{
public List<Device> Device { get; set; }
public double FreeSpace { get; set; }
public int Level { get; set; }
public int SlotNum { get; set; }
public int TankNo { get; set; }
public double Temperature { get; set; }
public double TotalSpace { get; set; }
}
public class Tank2
{
public int Level { get; set; }
public int Slot { get; set; }
public int TankNo { get; set; }
}
}
+437
View File
@@ -0,0 +1,437 @@
using CheckEVS;
using System;
using System.Net.Http;
using System.Net.Http.Json;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace DahuaDiskChecker
{
class Program
{
static async Task Main(string[] args)
{
string server = string.Empty;
//Console.WriteLine("=== ПРОВЕРКА СОСТОЯНИЯ ДИСКА DAHUA ===");
#if DEBUG
Console.WriteLine("Введи ip-адрес EVS:");
server = Console.ReadLine();
Console.WriteLine("Введи номер диска: (0 - количество неисправных, 1-24 - статус указанного");
int diskNumber = Convert.ToInt32(Console.ReadLine());
#else
// Парсинг аргументов
if (args.Length < 2)
{
await PromoPrint();
//Console.WriteLine("Использование: DahuaDiskChecker.exe <IP> <номер_диска> [пользователь] [пароль]");
//Console.WriteLine("Пример: DahuaDiskChecker.exe 172.16.48.147 10 admin admin");
return;
}
server = args[0];
if (!int.TryParse(args[1], out int diskNumber))
{
//Console.WriteLine("❌ Ошибка: номер диска должен быть числом");
return;
}
#endif
string user = args.Length > 2 ? args[2] : "admin";
string password = args.Length > 3 ? args[3] : "4NUDZhJ7";
try
{
var checker = new DahuaDiskChecker();
string status = await checker.CheckDiskStatusAsync(server, diskNumber, user, password);
// Вывод результата
//Console.WriteLine();
//Console.WriteLine(new string('=', 40));
try
{
Convert.ToInt32(status);
Console.WriteLine(status);
}
catch (Exception)
{
if (status == "NotFound")
{
Console.WriteLine("10");
}
else if (status == "Good")
{
Console.WriteLine("0");
}
else
{
Console.WriteLine("1");
}
}
#if DEBUG
Console.ReadKey();
#endif
//Console.WriteLine(new string('=', 40));
}
catch (Exception ex)
{
Console.WriteLine($"❌ Ошибка: {ex.Message}");
}
}
private static async Task PromoPrint()
{
// ╔ ═ ╦ ╗ ║ ╟ ╤ │ ─ ┷ ╢ ╚ ╝
Console.WriteLine("╔════════════════════════════╤════════════╗");
Console.WriteLine("║ autor: mastankov │ ver: 0.1 ║");
Console.WriteLine("╟────────────────────────────┴────────────╢");
Console.WriteLine("║ Пример: ║");
Console.WriteLine("║ DahuaDiskChecker.exe <IP> <номер_диска> ║");
Console.WriteLine("║ Вернет статус запрошенного диска ║");
Console.WriteLine("║ ║");
Console.WriteLine("║ DahuaDiskChecker.exe <IP> 0 ║");
Console.WriteLine("║ Вернет количество неисправных дисков ║");
Console.WriteLine("║ ║");
Console.WriteLine("║ Нажми Enter, чтобы выйти ║");
Console.WriteLine("╚═════════════════════════════════════════╝");
//Console.ReadKey();
}
}
public class DahuaDiskChecker
{
private readonly HttpClient _httpClient;
public DahuaDiskChecker()
{
_httpClient = new HttpClient();
_httpClient.Timeout = TimeSpan.FromSeconds(30);
}
// Вычисление MD5 хэша
private string CalculateMD5(string input)
{
using (MD5 md5 = MD5.Create())
{
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
foreach (byte b in hashBytes)
{
sb.Append(b.ToString("X2"));
}
return sb.ToString();
}
}
// Получение сессии
private async Task<string> GetSessionAsync(string server, string user, string password)
{
// 1. Challenge запрос
var challengeRequest = new
{
method = "global.login",
@params = new
{
userName = user,
password = "",
clientType = "Web3.0"
},
id = 1,
session = (string)null
};
string json = JsonSerializer.Serialize(challengeRequest);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await _httpClient.PostAsync($"http://{server}/RPC2_Login", content);
response.EnsureSuccessStatusCode();
var responseJson = await response.Content.ReadAsStringAsync();
using JsonDocument doc = JsonDocument.Parse(responseJson);
var root = doc.RootElement;
if (!root.TryGetProperty("result", out var resultProp) || resultProp.GetBoolean())
throw new Exception("Не удалось получить challenge");
string realm = root.GetProperty("params").GetProperty("realm").GetString();
string random = root.GetProperty("params").GetProperty("random").GetString();
string session = root.GetProperty("session").GetString();
// 2. Вычисление пароля
string pwdHash = CalculateMD5($"{user}:{realm}:{password}");
string passHash = CalculateMD5($"{user}:{random}:{pwdHash}");
// 3. Авторизация
var authRequest = new
{
method = "global.login",
@params = new
{
userName = user,
clientType = "Web3.0",
authorityType = "Default",
passwordType = "Default",
password = passHash
},
id = 2,
session = session
};
json = JsonSerializer.Serialize(authRequest);
content = new StringContent(json, Encoding.UTF8, "application/json");
response = await _httpClient.PostAsync($"http://{server}/RPC2_Login", content);
response.EnsureSuccessStatusCode();
responseJson = await response.Content.ReadAsStringAsync();
using JsonDocument authDoc = JsonDocument.Parse(responseJson);
var authRoot = authDoc.RootElement;
if (!authRoot.TryGetProperty("result", out resultProp) || !resultProp.GetBoolean())
throw new Exception("Ошибка авторизации");
return authRoot.GetProperty("session").GetString();
}
// Получение состояния диска
public async Task<string> CheckDiskStatusAsync(string server, int diskNumber, string user, string password)
{
try
{
// Получаем сессию
string session = await GetSessionAsync(server, user, password);
// Запрос информации о дисках
var diskRequest = new
{
method = "storage.getTankInfo",
@params = (object)null,
id = 270,
session
};
string json = JsonSerializer.Serialize(diskRequest);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await _httpClient.PostAsync($"http://{server}/RPC2", content);
response.EnsureSuccessStatusCode();
var responseJson = await response.Content.ReadAsStringAsync();
var listDisk = Newtonsoft.Json.JsonConvert.DeserializeObject<Disks>(responseJson).@params.tank[0].Device;
if (diskNumber != 0)
{
// Парсим ответ для поиска диска
string diskStatus = ParseDiskInfo(responseJson, diskNumber);
return diskStatus ?? "NotFound";
}
else
{
int countDiskWithError = 0;
for (int i = 0; i < listDisk.Count - 2; i++)
{
if (listDisk[i].PreDiskCheck != "Good" && listDisk[i].PreDiskCheck != "Warn")
countDiskWithError++;
}
return countDiskWithError.ToString();
}
}
catch (HttpRequestException ex)
{
throw new Exception($"Ошибка сети: {ex.Message}");
}
catch (Exception ex)
{
throw new Exception($"Ошибка: {ex.Message}");
}
}
// Парсинг информации о дисках
private string ParseDiskInfo(string jsonResponse, int diskNumber)
{
using JsonDocument doc = JsonDocument.Parse(jsonResponse);
var root = doc.RootElement;
// Проверяем успешность запроса
if (!root.TryGetProperty("result", out var resultProp) || !resultProp.GetBoolean())
return null;
// Ищем диски
if (!root.TryGetProperty("params", out var paramsProp))
return null;
if (!paramsProp.TryGetProperty("tank", out var tanksProp))
return null;
// Перебираем все массивы танков (хранилищ)
foreach (var tank in tanksProp.EnumerateArray())
{
if (!tank.TryGetProperty("Device", out var devicesProp))
continue;
// Перебираем устройства в танке
foreach (var device in devicesProp.EnumerateArray())
{
// Если устройство - строка (как в вашем примере)
if (device.ValueKind == JsonValueKind.String)
{
string deviceStr = device.GetString();
if (deviceStr.Contains($"PhysicNo={diskNumber}"))
{
// Ищем PreDiskCheck
int start = deviceStr.IndexOf("PreDiskCheck=");
if (start == -1) return "Unknown";
start += "PreDiskCheck=".Length;
int end = deviceStr.IndexOf(';', start);
if (end == -1) end = deviceStr.Length;
return deviceStr.Substring(start, end - start).Trim();
}
}
// Если устройство - объект
else if (device.ValueKind == JsonValueKind.Object)
{
// Пробуем получить PhysicNo как строку или число
string physicNo = null;
if (device.TryGetProperty("PhysicNo", out var physicNoProp))
{
if (physicNoProp.ValueKind == JsonValueKind.String)
{
physicNo = physicNoProp.GetString();
}
else if (physicNoProp.ValueKind == JsonValueKind.Number)
{
physicNo = physicNoProp.GetInt32().ToString();
}
}
// Если нашли нужный диск
if (physicNo == diskNumber.ToString())
{
// Получаем статус
if (device.TryGetProperty("PreDiskCheck", out var statusProp))
{
return statusProp.GetString() ?? "Unknown";
}
return "Unknown";
}
}
}
}
return null;
}
}
// Классы для десериализации JSON
public class DahuaResponse<T>
{
[JsonPropertyName("result")]
public bool Result { get; set; }
[JsonPropertyName("session")]
public string Session { get; set; }
[JsonPropertyName("params")]
public T Params { get; set; }
[JsonPropertyName("error")]
public ErrorInfo Error { get; set; }
[JsonPropertyName("id")]
public int Id { get; set; }
}
public class ChallengeData
{
[JsonPropertyName("authorization")]
public string Authorization { get; set; }
[JsonPropertyName("random")]
public string Random { get; set; }
[JsonPropertyName("realm")]
public string Realm { get; set; }
[JsonPropertyName("opaque")]
public string Opaque { get; set; }
}
public class AuthData
{
[JsonPropertyName("keepAliveInterval")]
public int KeepAliveInterval { get; set; }
[JsonPropertyName("isPwdOverdue")]
public bool IsPwdOverdue { get; set; }
}
public class TankInfoData
{
[JsonPropertyName("tank")]
public List<Tank> Tanks { get; set; }
}
public class Tank
{
[JsonPropertyName("Device")]
public List<JsonElement> Devices { get; set; }
[JsonPropertyName("FreeSpace")]
public double FreeSpace { get; set; }
[JsonPropertyName("Level")]
public int Level { get; set; }
[JsonPropertyName("SlotNum")]
public int SlotNum { get; set; }
[JsonPropertyName("TankNo")]
public int TankNo { get; set; }
[JsonPropertyName("Temperature")]
public double Temperature { get; set; }
[JsonPropertyName("TotalSpace")]
public double TotalSpace { get; set; }
}
public class Device
{
[JsonPropertyName("PhysicNo")]
public string PhysicNo { get; set; }
[JsonPropertyName("PreDiskCheck")]
public string PreDiskCheck { get; set; }
[JsonPropertyName("Name")]
public string Name { get; set; }
[JsonPropertyName("SerialNo")]
public string SerialNo { get; set; }
[JsonPropertyName("Temperature")]
public string Temperature { get; set; }
[JsonPropertyName("State")]
public string State { get; set; }
}
public class ErrorInfo
{
[JsonPropertyName("code")]
public int Code { get; set; }
[JsonPropertyName("message")]
public string Message { get; set; }
}
}
+913
View File
@@ -0,0 +1,913 @@
{
"id": 270,
"params": {
"tank": [
{
"Device": [
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sda",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 10,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019EWD",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdb",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 12,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019E1D",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdc",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 11,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019EZE",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdd",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 16,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019E0F",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 27,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sde",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 15,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019EWB",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 28,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdf",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 13,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019E3B",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 28,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdg",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 9,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019E1P",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdh",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 5,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019E1L",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdi",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 1,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019EVN",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdj",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 6,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019E3G",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SND0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdk",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 2,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019EGM",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdl",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 4,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019EVM",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdm",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 3,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019EBK",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdn",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 8,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019E2J",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdo",
"OpState": 0,
"Parent": "\/dev\/md0",
"Partitions": [],
"PhysicNo": 7,
"PosLedState": 0,
"PowerMode": "StandBy",
"PreDiskCheck": "Good",
"SerialNo": "WP019EBQ",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdp",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 20,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019EZK",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 29,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdq",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 19,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019E3P",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 29,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdr",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 24,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019E4H",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 28,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sds",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 23,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019E3Q",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 28,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdt",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 22,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019EVD",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 28,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdu",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 14,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Warn",
"SerialNo": "WP019EWH",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 28,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdv",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 18,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019EZM",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 30,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdw",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 21,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019EWL",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 28,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "SATA",
"Capacity": 9999757606912.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Firmware": "SNE0",
"LogicNo": 0,
"MRType": 0,
"Media": "DISK",
"MediaType": "HDD",
"Module": "ST10000VE0012KX101",
"Name": "\/dev\/sdx",
"OpState": 0,
"Parent": "\/dev\/md1",
"Partitions": [],
"PhysicNo": 17,
"PosLedState": 0,
"PowerMode": "Active",
"PreDiskCheck": "Good",
"SerialNo": "WP019E0H",
"State": "Sync",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Temperature": 30,
"UseMode": 0,
"Volume": "RaidVolume"
},
{
"BUS": "",
"Capacity": 109997332054016.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Name": "\/dev\/md0",
"OpState": 0,
"Parent": null,
"Partitions": [
{
"FileSystem": "PVDISK",
"IsSupportFs": false,
"Name": "\/dev\/md0",
"Start": 0,
"Total": 3219603456
}
],
"Raid": {
"ActiveDevices": 12,
"AliasName": "RAID5_1",
"ChunkSize": 16,
"FailedDevices": 0,
"Level": 5,
"MemberInfos": [
{
"ID": 8,
"Spare": false
},
{
"ID": 11,
"Spare": false
},
{
"ID": 4,
"Spare": false
},
{
"ID": 10,
"Spare": false
},
{
"ID": 6,
"Spare": false
},
{
"ID": 5,
"Spare": false
},
{
"ID": 7,
"Spare": false
},
{
"ID": 3,
"Spare": false
},
{
"ID": 12,
"Spare": false
},
{
"ID": 2,
"Spare": false
},
{
"ID": 1,
"Spare": false
},
{
"ID": 9,
"Spare": false
}
],
"Members": [ "\/dev\/sdn", "\/dev\/sdc", "\/dev\/sdl", "\/dev\/sda", "\/dev\/sdj", "\/dev\/sdh", "\/dev\/sdo", "\/dev\/sdm", "\/dev\/sdb", "\/dev\/sdk", "\/dev\/sdi", "\/dev\/sdg" ],
"RaidDevices": 12,
"RecoverMBps": 0.0,
"RecoverPercent": 0.0,
"RecoverTimeRemain": 0,
"SpareDevices": 0,
"State": [ "Active", "CreatVG" ],
"Sync": 0,
"TotalDevices": 12,
"UUID": "2cb254ea:b401130a:6e9e714d:ffc1de04",
"WorkingDevices": 12
},
"State": "Active",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Volume": "VolumeGroup"
},
{
"BUS": "",
"Capacity": 109997332054016.0,
"CmrSize": 0,
"DRTypeMixState": "Single",
"Name": "\/dev\/md1",
"OpState": 0,
"Parent": null,
"Partitions": [
{
"FileSystem": "PVDISK",
"IsSupportFs": false,
"Name": "\/dev\/md1",
"Start": 0,
"Total": 3219603456
}
],
"Raid": {
"ActiveDevices": 12,
"AliasName": "RAID5_2",
"ChunkSize": 16,
"FailedDevices": 0,
"Level": 5,
"MemberInfos": [
{
"ID": 17,
"Spare": false
},
{
"ID": 15,
"Spare": false
},
{
"ID": 18,
"Spare": false
},
{
"ID": 22,
"Spare": false
},
{
"ID": 24,
"Spare": false
},
{
"ID": 20,
"Spare": false
},
{
"ID": 13,
"Spare": false
},
{
"ID": 21,
"Spare": false
},
{
"ID": 16,
"Spare": false
},
{
"ID": 14,
"Spare": false
},
{
"ID": 23,
"Spare": false
},
{
"ID": 19,
"Spare": false
}
],
"Members": [ "\/dev\/sdx", "\/dev\/sde", "\/dev\/sdv", "\/dev\/sdt", "\/dev\/sdr", "\/dev\/sdp", "\/dev\/sdf", "\/dev\/sdw", "\/dev\/sdd", "\/dev\/sdu", "\/dev\/sds", "\/dev\/sdq" ],
"RaidDevices": 12,
"RecoverMBps": 0.0,
"RecoverPercent": 0.0,
"RecoverTimeRemain": 0,
"SpareDevices": 0,
"State": [ "Active", "CreatVG" ],
"Sync": 0,
"TotalDevices": 12,
"UUID": "9a7e6e86:180ea46a:b19dd6f2:cb6a4e62",
"WorkingDevices": 12
},
"State": "Active",
"Tank": {
"Level": 0,
"Slot": 0,
"TankNo": 0
},
"Volume": "VolumeGroup"
}
],
"FreeSpace": 0.0,
"Level": 0,
"SlotNum": 24,
"TankNo": 0,
"Temperature": 0.0,
"TotalSpace": 0.0
}
]
},
"result": true,
"session": "b62094f5c75a79c4a690dcc52ab8d365"
}
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5CBD52DC-CABA-426B-9B32-1583F10F60A2}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>CheckTimeHikvision</RootNamespace>
<AssemblyName>CheckTimeHikvision</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>\\172.16.48.150\shara\algorius\myapps\GetCurrentTimeIPC\TimeHikvision\</PublishUrl>
<Install>true</Install>
<InstallFrom>Unc</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>B6A785D6AB34D0981DD89243D25F9969F436678B</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>CheckTimeHikvision_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="CheckTimeHikvision_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.8 %28x86 и x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+105
View File
@@ -0,0 +1,105 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace CheckTimeHikvision
{
internal class Program
{
static async Task Main(string[] args)
{
#if DEBUG
args = new string[4];
args[0] = "update";
args[1] = "172.16.50.151";
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];
switch (args[0])
{
case "check":
string baseUrl = $"http://{server}";
var credCache = new CredentialCache();
credCache.Add(new Uri(baseUrl), "Digest", new NetworkCredential(login, password));
using (var handler = new HttpClientHandler
{
Credentials = credCache,
//ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true
})
using (var httpClient = new HttpClient(handler))
{
string requestUrl = $"{baseUrl}/ISAPI/System/time/localTime";
var response = await httpClient.GetAsync(requestUrl);
try
{
response.EnsureSuccessStatusCode();
}
catch (Exception)
{
Console.WriteLine("1");
return;
}
var r = await response.Content.ReadAsStringAsync();
var r2 = Convert.ToDateTime(r);
if (r2 <= DateTime.Now.AddMinutes(2) && r2 >= DateTime.Now.AddMinutes(-2))
Console.WriteLine("0");
else Console.WriteLine("1");
}
break;
case "update":
string baseUrlU = $"http://{server}";
var credCacheU = new CredentialCache();
credCacheU.Add(new Uri(baseUrlU), "Digest", new NetworkCredential(login, password));
using (var handler = new HttpClientHandler
{
Credentials = credCacheU,
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true
})
using (var httpClient = new HttpClient(handler))
{
string requestUrl = $"{baseUrlU}/ISAPI/System/time";
string xmlBody = $@"<?xml version=""1.0"" encoding=""UTF-8""?><Time><timeMode>manual</timeMode><localTime>{DateTime.Now:yyyy-MM-ddTHH:mm:ss}</localTime><timeZone>CST-3:00:00</timeZone></Time>";
// Создаем контент для PUT запроса
var content = new StringContent(xmlBody, Encoding.UTF8, "application/xml");
// Выполняем PUT запрос
var response = await httpClient.PutAsync(requestUrl, content);
try
{
response.EnsureSuccessStatusCode();
}
catch (Exception)
{
Console.WriteLine("1");
return;
}
var r = await response.Content.ReadAsStringAsync();
//r = r.Replace("\r\n", "");
if (r.StartsWith("OK"))
{
Console.WriteLine("0");
}
else Console.WriteLine("1");
}
break;
default:
break;
}
}
}
}
@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Общие сведения об этой сборке предоставляются следующим набором
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
// связанные с этой сборкой.
[assembly: AssemblyTitle("CheckTimeHikvision")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CheckTimeHikvision")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
// из модели COM задайте для атрибута ComVisible этого типа значение true.
[assembly: ComVisible(false)]
// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM
[assembly: Guid("5cbd52dc-caba-426b-9b32-1583f10f60a2")]
// Сведения о версии сборки состоят из указанных ниже четырех значений:
//
// Основной номер версии
// Дополнительный номер версии
// Номер сборки
// Номер редакции
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+11
View File
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
+90
View File
@@ -0,0 +1,90 @@
using System.Net;
namespace ChekTimeDahua
{
internal class Program
{
static async Task Main(string[] args)
{
#if DEBUG
args = new string[4];
args[0] = "check";
args[1] = "172.16.50.14";
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];
switch (args[0])
{
case "check":
string baseUrl = $"http://{server}";
var credCache = new CredentialCache();
credCache.Add(new Uri(baseUrl), "Digest", new NetworkCredential(login, password));
using (var handler = new HttpClientHandler
{
Credentials = credCache,
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true
})
using (var httpClient = new HttpClient(handler))
{
string requestUrl = $"{baseUrl}/cgi-bin/global.cgi?action=getCurrentTime";
var response = await httpClient.GetAsync(requestUrl);
try
{
response.EnsureSuccessStatusCode();
}
catch (Exception)
{
Console.WriteLine("1");
return;
}
var r = await response.Content.ReadAsStringAsync();
var r2 = Convert.ToDateTime(r.Split("=")[1]);
if (r2 <= DateTime.Now.AddMinutes(2) && r2 >= DateTime.Now.AddMinutes(-2))
Console.WriteLine("0");
else Console.WriteLine("1");
}
break;
case "update":
string baseUrlU = $"http://{server}";
var credCacheU = new CredentialCache();
credCacheU.Add(new Uri(baseUrlU), "Digest", new NetworkCredential(login, password));
using (var handler = new HttpClientHandler
{
Credentials = credCacheU,
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true
})
using (var httpClient = new HttpClient(handler))
{
string requestUrl = $"{baseUrlU}/cgi-bin/global.cgi?action=setCurrentTime&time={DateTime.Now:yyyy-MM-dd HH:mm:ss}";
var response = await httpClient.GetAsync(requestUrl);
try
{
response.EnsureSuccessStatusCode();
}
catch (Exception)
{
Console.WriteLine("1");
return;
}
var r = await response.Content.ReadAsStringAsync();
//r = r.Replace("\r\n", "");
if (r.StartsWith("OK"))
{
Console.WriteLine("0");
}
else Console.WriteLine("1");
}
break;
default:
break;
}
}
}
}
+10
View File
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
+48
View File
@@ -0,0 +1,48 @@
using System.Net;
namespace DahuaIPCRename
{
internal class Program
{
public static Dictionary<string, string> listIPC = new Dictionary<string, string>
{
{"172.22.10.221","Домофон|Глав.вход"},
{"172.22.10.222","Домофон|Линкор"},
{"172.22.10.223","Домофон|НЛК-1"},
{"172.22.10.224","Домофон|НЛК-2"},
{"172.22.10.225","Домофон|Ленмикс"},
{"172.22.10.226","Домофон|Карбон"}
};
static async Task Main(string[] args)
{
foreach (var ipc in listIPC)
{
string baseUrl = $"http://{ipc.Key}";
var credCache = new CredentialCache();
credCache.Add(new Uri(baseUrl), "Digest", new NetworkCredential("admin", "4NUDZhJ7"));
using (var handler = new HttpClientHandler
{
Credentials = credCache,
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true
})
using (var httpClient = new HttpClient(handler))
{
string requestUrl = $"{baseUrl}/cgi-bin/configManager.cgi?action=setConfig&ChannelTitle[0].Name={ipc.Value}";
var response = await httpClient.GetAsync(requestUrl);
try
{
response.EnsureSuccessStatusCode();
Console.WriteLine($"{ipc.Key}\tOK\t{ipc.Value}");
}
catch (Exception)
{
Console.WriteLine($"{ipc.Key}\tNO\t{ipc.Value}");
return;
}
}
}
Console.ReadKey();
}
}
}
+2 -2
View File
@@ -219,8 +219,8 @@ If you develop a new program, and you want it to be of the greatest possible use
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
work
Copyright (C) 2026 astankovmi
lcsoft
Copyright (C) 2026 admin
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+1 -2
View File
@@ -1,2 +1 @@
# work
# lsSoft
+229
View File
@@ -0,0 +1,229 @@
namespace SwitchDahua
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
groupBox1 = new GroupBox();
button1 = new Button();
comboBox1 = new ComboBox();
statusConnect = new Label();
label3 = new Label();
label2 = new Label();
label1 = new Label();
textBox3 = new TextBox();
textBox2 = new TextBox();
tabControl1 = new TabControl();
tabPage1 = new TabPage();
textBox4 = new TextBox();
tabPage2 = new TabPage();
textBox5 = new TextBox();
groupBox1.SuspendLayout();
tabControl1.SuspendLayout();
tabPage1.SuspendLayout();
tabPage2.SuspendLayout();
SuspendLayout();
//
// groupBox1
//
groupBox1.Controls.Add(button1);
groupBox1.Controls.Add(comboBox1);
groupBox1.Controls.Add(statusConnect);
groupBox1.Controls.Add(label3);
groupBox1.Controls.Add(label2);
groupBox1.Controls.Add(label1);
groupBox1.Controls.Add(textBox3);
groupBox1.Controls.Add(textBox2);
groupBox1.Location = new Point(12, 12);
groupBox1.Name = "groupBox1";
groupBox1.Size = new Size(713, 60);
groupBox1.TabIndex = 0;
groupBox1.TabStop = false;
groupBox1.Text = "groupBox1";
//
// button1
//
button1.Location = new Point(571, 18);
button1.Name = "button1";
button1.Size = new Size(96, 23);
button1.TabIndex = 3;
button1.Text = "Подключиться";
button1.UseVisualStyleBackColor = true;
button1.Click += button1_Click;
//
// comboBox1
//
comboBox1.FormattingEnabled = true;
comboBox1.Items.AddRange(new object[] { "172.16.48.9\tkr0-1-sw1", "172.16.48.10\tkr0-1-sw2", "172.16.48.11\tkr0-1-sw3", "172.16.48.12\tkr0-1-sw4", "172.16.48.13\tkr0-2-sw1", "172.16.48.14\tkr0-2-sw2", "172.16.48.15\tkr0-2-sw3", "172.16.48.16\tkr0-2-sw4", "172.16.48.17\tkr1_sw1", "172.16.48.18\tkr1_sw2", "172.16.48.19\tkr1_sw3", "172.16.48.20\tkr1_sw4", "172.16.48.21\tkr1_sw5", "172.16.48.22\tkr1_sw6", "172.16.48.23\tkr2-sw1", "172.16.48.24\tkr2-sw2", "172.16.48.25\tkr2-sw3", "172.16.48.26\tkr2-sw4", "172.16.48.27\tkr2-sw5", "172.16.48.28\tkr2-sw6", "172.16.48.29\tkr2-sw7", "172.16.48.30\tkr2-sw8", "172.16.48.31\tkr3-sw1", "172.16.48.32\tkr3-sw2", "172.16.48.33\tkr3-sw3", "172.16.48.34\tkr3-sw4", "172.16.48.35\tkr3-sw5", "172.16.48.36\tkr3-sw6", "172.16.48.37\tkr4-sw1", "172.16.48.38\tkr4-sw2", "172.16.48.39\tkr4-sw3", "172.16.48.40\tkr4-sw4", "172.16.48.41\tkr4-sw5", "172.16.48.42\tkr4-sw6", "172.16.48.43\tkr4-sw7", "172.16.48.44\tkr4-sw8", "172.16.48.45\tkr5-sw1", "172.16.48.46\tkr6-sw1", "172.16.48.47\tkr6-sw2", "172.16.48.48\tkr7-sw1", "172.16.48.49\tkr7-sw2", "172.16.48.50\tkr8-sw1", "172.16.48.51\tkr8-sw2", "172.16.48.52\tkr9-sw1", "172.16.48.53\tkr10-sw1", "172.16.48.54\tkr10-sw2", "172.16.48.55\tkr10-sw3", "172.16.48.56\tkr11-sw1", "172.16.48.57\tkr11-sw2", "172.16.48.58\tkr11-sw3", "172.16.48.59\tkr11-sw4", "172.16.48.60\tkr12-sw1", "172.16.48.61\tkr12-sw2", "172.16.48.62\tkr13-sw1", "172.16.48.63\tkr13-sw2", "172.16.48.64\tkr14-sw1", "172.16.48.65\tkr14-sw2", "172.16.48.66\tkr15-sw1", "172.16.48.67\tkr15-sw2", "172.16.48.68\tkr15-sw3", "172.16.48.69\tkr15-sw4", "172.16.48.70\tkr16-sw1", "172.16.48.71\tkr16-sw2", "172.16.48.72\tkr16-sw3", "172.16.48.73\tkr16-sw4", "172.16.48.74\tkr16-sw5", "172.16.48.75\tkr16-sw6", "172.16.48.76\tkr2_sw9", "172.16.48.77\tsw_rum111", "172.16.48.78\tkr15_sw5" });
comboBox1.Location = new Point(32, 20);
comboBox1.Name = "comboBox1";
comboBox1.Size = new Size(147, 21);
comboBox1.TabIndex = 2;
comboBox1.Text = "172.16.48.9\tkr0-1-sw1";
comboBox1.SelectedIndexChanged += comboBox1_SelectedIndexChanged;
//
// statusConnect
//
statusConnect.AutoSize = true;
statusConnect.Location = new Point(673, 23);
statusConnect.Name = "statusConnect";
statusConnect.Size = new Size(31, 13);
statusConnect.TabIndex = 2;
statusConnect.Text = "✅❎";
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(370, 23);
label3.Name = "label3";
label3.Size = new Size(48, 13);
label3.TabIndex = 2;
label3.Text = "Пароль:";
//
// label2
//
label2.AutoSize = true;
label2.Location = new Point(185, 23);
label2.Name = "label2";
label2.Size = new Size(37, 13);
label2.TabIndex = 2;
label2.Text = "Логин";
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(6, 23);
label1.Name = "label1";
label1.Size = new Size(21, 13);
label1.TabIndex = 1;
label1.Text = "IP:";
//
// textBox3
//
textBox3.Location = new Point(422, 20);
textBox3.Name = "textBox3";
textBox3.PasswordChar = '#';
textBox3.Size = new Size(127, 21);
textBox3.TabIndex = 0;
textBox3.Text = "4NUDZhJ7";
//
// textBox2
//
textBox2.Location = new Point(226, 20);
textBox2.Name = "textBox2";
textBox2.Size = new Size(127, 21);
textBox2.TabIndex = 0;
textBox2.Text = "admin";
//
// tabControl1
//
tabControl1.Controls.Add(tabPage1);
tabControl1.Controls.Add(tabPage2);
tabControl1.Font = new Font("Tahoma", 12F);
tabControl1.Location = new Point(12, 78);
tabControl1.Name = "tabControl1";
tabControl1.SelectedIndex = 0;
tabControl1.Size = new Size(713, 690);
tabControl1.TabIndex = 1;
//
// tabPage1
//
tabPage1.Controls.Add(textBox4);
tabPage1.Location = new Point(4, 22);
tabPage1.Name = "tabPage1";
tabPage1.Padding = new Padding(3);
tabPage1.Size = new Size(705, 664);
tabPage1.TabIndex = 0;
tabPage1.Text = "LLDP";
tabPage1.UseVisualStyleBackColor = true;
//
// textBox4
//
textBox4.Font = new Font("Tahoma", 12F);
textBox4.Location = new Point(6, 6);
textBox4.Multiline = true;
textBox4.Name = "textBox4";
textBox4.ScrollBars = ScrollBars.Vertical;
textBox4.Size = new Size(693, 652);
textBox4.TabIndex = 0;
//
// tabPage2
//
tabPage2.Controls.Add(textBox5);
tabPage2.Location = new Point(4, 28);
tabPage2.Name = "tabPage2";
tabPage2.Padding = new Padding(3);
tabPage2.Size = new Size(705, 658);
tabPage2.TabIndex = 1;
tabPage2.Text = "MAC";
tabPage2.UseVisualStyleBackColor = true;
//
// textBox5
//
textBox5.Location = new Point(6, 6);
textBox5.Multiline = true;
textBox5.Name = "textBox5";
textBox5.Size = new Size(693, 397);
textBox5.TabIndex = 0;
//
// Form1
//
AutoScaleDimensions = new SizeF(6F, 13F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(734, 780);
Controls.Add(tabControl1);
Controls.Add(groupBox1);
Name = "Form1";
Text = "Form1";
groupBox1.ResumeLayout(false);
groupBox1.PerformLayout();
tabControl1.ResumeLayout(false);
tabPage1.ResumeLayout(false);
tabPage1.PerformLayout();
tabPage2.ResumeLayout(false);
tabPage2.PerformLayout();
ResumeLayout(false);
}
#endregion
private GroupBox groupBox1;
private Label label1;
private Button button1;
private Label label3;
private Label label2;
private TextBox textBox3;
private TextBox textBox2;
private Label statusConnect;
private TabControl tabControl1;
private TabPage tabPage1;
private TextBox textBox4;
private TabPage tabPage2;
private TextBox textBox5;
private ComboBox comboBox1;
}
}
+212
View File
@@ -0,0 +1,212 @@
using Microsoft.VisualBasic.ApplicationServices;
using Newtonsoft.Json;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
namespace SwitchDahua
{
public partial class Form1 : Form
{
private readonly HttpClient _httpClient;
private string server, user, password, session;
private int token;
public Form1()
{
InitializeComponent();
var handler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true
};
server = "172.16.48.9";
_httpClient = new HttpClient(handler);
_httpClient.Timeout = TimeSpan.FromSeconds(30);
}
private string CalculateMD5(string input)
{
using (MD5 md5 = MD5.Create())
{
byte[] inputBytes = Encoding.UTF8.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
foreach (byte b in hashBytes)
{
sb.Append(b.ToString("X2"));
}
return sb.ToString();
}
}
private async Task<string> GetSessionAsync(string server, string user, string password)
{
// 1. Challenge çàïðîñ
var challengeRequest = new
{
method = "global.login",
@params = new
{
userName = user,
password = "",
clientType = "Web3.0"
},
id = 1,
session = (string)null
};
string json = System.Text.Json.JsonSerializer.Serialize(challengeRequest);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await _httpClient.PostAsync($"http://{server}/RPC2_Login", content);
response.EnsureSuccessStatusCode();
var responseJson = await response.Content.ReadAsStringAsync();
using JsonDocument doc = JsonDocument.Parse(responseJson);
var root = doc.RootElement;
if (!root.TryGetProperty("result", out var resultProp) || resultProp.GetBoolean())
throw new Exception("Íå óäàëîñü ïîëó÷èòü challenge");
string realm = root.GetProperty("params").GetProperty("realm").GetString();
string random = root.GetProperty("params").GetProperty("random").GetString();
string session = root.GetProperty("session").GetString();
// 2. Âû÷èñëåíèå ïàðîëÿ
string pwdHash = CalculateMD5($"{user}:{realm}:{password}");
string passHash = CalculateMD5($"{user}:{random}:{pwdHash}");
// 3. Àâòîðèçàöèÿ
var authRequest = new
{
method = "global.login",
@params = new
{
userName = user,
clientType = "Web3.0",
authorityType = "Default",
passwordType = "Default",
password = passHash
},
id = 2,
session = session
};
json = System.Text.Json.JsonSerializer.Serialize(authRequest);
content = new StringContent(json, Encoding.UTF8, "application/json");
response = await _httpClient.PostAsync($"http://{server}/RPC2_Login", content);
response.EnsureSuccessStatusCode();
responseJson = await response.Content.ReadAsStringAsync();
using JsonDocument authDoc = JsonDocument.Parse(responseJson);
var authRoot = authDoc.RootElement;
if (!authRoot.TryGetProperty("result", out resultProp) || !resultProp.GetBoolean())
throw new Exception("Îøèáêà àâòîðèçàöèè");
return authRoot.GetProperty("session").GetString();
}
private async void button1_Click(object sender, EventArgs e)
{
comboBox1.SelectionStart = 0;
user = textBox2.Text;
password = textBox3.Text;
session = await GetSessionAsync(server, user, password);
await GetLLDP();
await GetMacTable();
// Çàïðîñ èíôîðìàöèè î äèñêàõ
}
private async Task GetMacTable()
{
var portRequest = new
{
method = "PortManager.startFindMac",
@params = new
{
Condition = new object() // èëè êîíêðåòíûå óñëîâèÿ ïîèñêà
},
id = 270, // Èäåíòèôèêàòîð çàïðîñà
session // Ñåññèÿ èç àâòîðèçàöèè
};
string json = System.Text.Json.JsonSerializer.Serialize(portRequest);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await _httpClient.PostAsync($"http://{server}/RPC2", content);
response.EnsureSuccessStatusCode();
var responseJson = await response.Content.ReadAsStringAsync();
MAC1 ListDev = JsonConvert.DeserializeObject<MAC1>(responseJson);
token = ListDev.Params.Token;
var MacRequest = new
{
method = "PortManager.doFindMac",
@params = new
{
Count = 24,
Offset = 0,
Token = token
},
id = 270, // Èäåíòèôèêàòîð çàïðîñà
session // Ñåññèÿ èç àâòîðèçàöèè
};
string json2 = System.Text.Json.JsonSerializer.Serialize(MacRequest);
var content2 = new StringContent(json2, Encoding.UTF8, "application/json");
var response2 = await _httpClient.PostAsync($"http://{server}/RPC2", content2);
response2.EnsureSuccessStatusCode();
var responseJson2 = await response2.Content.ReadAsStringAsync();
MAC ListDev2 = JsonConvert.DeserializeObject<MAC>(responseJson2);
var listMac = ListDev2.Params.Info;
string txt2 = string.Empty;
foreach (var dev in listMac)
{
txt2 += dev.PortID + "\t" + dev.MAC + Environment.NewLine;
}
textBox5.Text = txt2;
}
private async Task GetLLDP()
{
var diskRequest = new
{
method = "LLDPManager.getLLDPNeighborsInfo",
@params = (object)null,
id = 270,
session
};
string json = System.Text.Json.JsonSerializer.Serialize(diskRequest);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await _httpClient.PostAsync($"http://{server}/RPC2", content);
response.EnsureSuccessStatusCode();
var responseJson = await response.Content.ReadAsStringAsync();
LLDP ListDev = JsonConvert.DeserializeObject<LLDP>(responseJson);
string txt = string.Empty;
foreach (var dev in ListDev.Params)
{
txt += dev.LocalInterface.Substring(dev.LocalInterface.LastIndexOf('/') + 1) + "\t" + dev.ManagerIP + Environment.NewLine;
}
textBox4.Text = txt;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
var t = comboBox1.Items[comboBox1.SelectedIndex].ToString();
t = t.Substring(0,t.Length - (t.Length - t.IndexOf("\t")));
server = t;
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+65
View File
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SwitchDahua
{
public class LLDP
{
public int id { get; set; }
public List<ParamLLDP>? Params { get; set; }
public bool result { get; set; }
public string? session { get; set; }
}
public class ParamLLDP
{
public string? LocalInterface { get; set; }
public string? ManagerIP { get; set; }
public string? PortDescribe { get; set; }
public string? PortID { get; set; }
public string? SysAbility { get; set; }
public string? SysName { get; set; }
}
public class Condition
{
}
public class ParamsMAC1
{
public int Count { get; set; }
public int Token { get; set; }
}
public class MAC1
{
public int id { get; set; }
public ParamsMAC1 Params { get; set; }
public bool result { get; set; }
public string session { get; set; }
}
public class InfoMAC
{
public int KeepState { get; set; }
public string MAC { get; set; }
public int PortID { get; set; }
public int PortType { get; set; }
public int Type { get; set; }
public int VlanID { get; set; }
}
public class ParamsMAC
{
public List<InfoMAC> Info { get; set; }
}
public class MAC
{
public int id { get; set; }
public ParamsMAC Params { get; set; }
public bool result { get; set; }
public string session { get; set; }
}
}
+17
View File
@@ -0,0 +1,17 @@
namespace SwitchDahua
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new Form1());
}
}
}
+15
View File
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>
</Project>
+71
View File
@@ -0,0 +1,71 @@
using Microsoft.AspNetCore.Mvc;
[ApiController]
[Route("api/[controller]")]
public class TestController : ControllerBase
{
[HttpGet]
[Produces("text/html")]
public ContentResult GetSchema()
{
var html = @"
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Схема подключения</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 40px;
background: #f0f2f5;
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #2c3e50;
border-bottom: 3px solid #3498db;
padding-bottom: 10px;
}
.node {
background: #3498db;
color: white;
padding: 15px;
margin: 10px;
border-radius: 5px;
display: inline-block;
}
</style>
</head>
<body>
<div class='container'>
<h1>Схема подключения устройства</h1>
<p>Эта страница возвращается из Web API контроллера</p>
<div style='text-align: center; margin: 30px 0;'>
<div class='node'>Маршрутизатор</div>
<div style='margin: 20px;'>↓</div>
<div class='node'>Коммутатор</div>
<div style='margin: 20px; display: flex; justify-content: space-around;'>
<div>
<div class='node'>Сервер</div>
<div class='node'>Компьютер 1</div>
<div class='node'>Компьютер 2</div>
</div>
</div>
</div>
<p><strong>Время генерации:</strong> " + DateTime.Now.ToString("HH:mm:ss") + @"</p>
</div>
</body>
</html>";
return Content(html, "text/html; charset=utf-8");
}
}
@@ -0,0 +1,62 @@
using Microsoft.AspNetCore.Mvc;
using System.Net;
using System.Net.Http.Headers;
namespace Wiking.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
private readonly ILogger<WeatherForecastController> _logger;
public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}
[HttpGet(Name = "GetWeatherForecast")]
public IEnumerable<WeatherForecast> Get()
{
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
})
.ToArray();
}
[HttpGet]
[Route("api/schema")]
public HttpResponseMessage GetHtmlPage()
{
var htmlContent = @"<!DOCTYPE html>
<html>
<head>
<title>Ñõåìà ïîäêëþ÷åíèÿ</title>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
h1 { color: #333; }
</style>
</head>
<body>
<h1>Ñõåìà ïîäêëþ÷åíèÿ óñòðîéñòâà</h1>
<p>Ýòî HTML ñòðàíèöà, âîçâðàùàåìàÿ èç WebApi êîíòðîëëåðà</p>
<div>Çäåñü ìîæåò áûòü âàøà ñõåìà ïîäêëþ÷åíèÿ</div>
</body>
</html>";
var response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StringContent(htmlContent);
response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html");
return response;
}
}
}
+36
View File
@@ -0,0 +1,36 @@
namespace Wiking
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
}
}
}
+41
View File
@@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:60191",
"sslPort": 44339
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://192.168.1.228:5292",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://192.168.1.228:7189;http://192.168.1.228:5292",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
+13
View File
@@ -0,0 +1,13 @@
namespace Wiking
{
public class WeatherForecast
{
public DateOnly Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string? Summary { get; set; }
}
}
+19
View File
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>
<ItemGroup>
<None Update="htmlpage.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
+6
View File
@@ -0,0 +1,6 @@
@Wiking_HostAddress = http://localhost:5292
GET {{Wiking_HostAddress}}/weatherforecast/
Accept: application/json
###
+8
View File
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}
+475
View File
@@ -0,0 +1,475 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Схема подключения устройства</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
min-height: 100vh;
padding: 20px;
color: #333;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
header {
text-align: center;
margin-bottom: 30px;
padding: 20px;
background-color: white;
border-radius: 15px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
h1 {
color: #2c3e50;
margin-bottom: 10px;
font-size: 2.2rem;
}
.subtitle {
color: #7f8c8d;
font-size: 1.1rem;
}
.content {
display: flex;
flex-wrap: wrap;
gap: 30px;
margin-bottom: 30px;
}
.diagram-container {
flex: 1;
min-width: 300px;
background-color: white;
border-radius: 15px;
padding: 25px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.instructions {
flex: 1;
min-width: 300px;
background-color: white;
border-radius: 15px;
padding: 25px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.section-title {
color: #2c3e50;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #3498db;
display: flex;
align-items: center;
gap: 10px;
}
.section-title i {
color: #3498db;
}
.diagram {
position: relative;
height: 400px;
background-color: #f8f9fa;
border-radius: 10px;
border: 2px dashed #ddd;
overflow: hidden;
}
.device {
position: absolute;
width: 100px;
height: 100px;
background-color: white;
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
cursor: pointer;
z-index: 2;
}
.device:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}
.device i {
font-size: 30px;
margin-bottom: 8px;
}
.device-name {
font-weight: 600;
font-size: 0.9rem;
text-align: center;
}
.device-1 {
top: 50px;
left: 50px;
border-top: 4px solid #e74c3c;
}
.device-2 {
top: 50px;
right: 50px;
border-top: 4px solid #3498db;
}
.device-3 {
bottom: 50px;
left: 50px;
border-top: 4px solid #2ecc71;
}
.device-4 {
bottom: 50px;
right: 50px;
border-top: 4px solid #f39c12;
}
.device-5 {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 120px;
height: 120px;
border-top: 4px solid #9b59b6;
}
.connection {
position: absolute;
height: 4px;
background-color: #3498db;
z-index: 1;
transform-origin: left center;
}
.connection-1 {
width: 120px;
top: 100px;
left: 160px;
transform: rotate(0deg);
}
.connection-2 {
width: 120px;
top: 100px;
right: 160px;
transform: rotate(180deg);
}
.connection-3 {
width: 120px;
bottom: 100px;
left: 160px;
transform: rotate(0deg);
}
.connection-4 {
width: 120px;
bottom: 100px;
right: 160px;
transform: rotate(180deg);
}
.steps {
list-style-type: none;
counter-reset: step-counter;
}
.step {
margin-bottom: 20px;
padding-left: 40px;
position: relative;
}
.step:before {
counter-increment: step-counter;
content: counter(step-counter);
position: absolute;
left: 0;
top: 0;
width: 28px;
height: 28px;
background-color: #3498db;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
}
.step h3 {
color: #2c3e50;
margin-bottom: 5px;
}
.step p {
color: #555;
line-height: 1.5;
}
.details {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.detail-box {
flex: 1;
min-width: 250px;
background-color: white;
border-radius: 15px;
padding: 20px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.detail-item {
display: flex;
justify-content: space-between;
padding: 12px 0;
border-bottom: 1px solid #eee;
}
.detail-item:last-child {
border-bottom: none;
}
.detail-label {
font-weight: 600;
color: #2c3e50;
}
.detail-value {
color: #3498db;
font-weight: 500;
}
footer {
text-align: center;
margin-top: 30px;
padding: 20px;
color: #7f8c8d;
font-size: 0.9rem;
}
.highlight {
background-color: #e8f4fc;
padding: 3px 6px;
border-radius: 4px;
font-weight: 500;
}
@media (max-width: 768px) {
.content {
flex-direction: column;
}
.device {
width: 80px;
height: 80px;
}
.device-5 {
width: 90px;
height: 90px;
}
.device i {
font-size: 22px;
}
.device-name {
font-size: 0.8rem;
}
.connection {
height: 3px;
}
.connection-1, .connection-2, .connection-3, .connection-4 {
width: 80px;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Схема подключения устройства</h1>
<p class="subtitle">Интерактивная схема подключения сетевого оборудования</p>
</header>
<div class="content">
<div class="diagram-container">
<h2 class="section-title"><i class="fas fa-project-diagram"></i> Схема подключения</h2>
<div class="diagram">
<!-- Подключения -->
<div class="connection connection-1"></div>
<div class="connection connection-2"></div>
<div class="connection connection-3"></div>
<div class="connection connection-4"></div>
<!-- Устройства -->
<div class="device device-1" data-device="router">
<i class="fas fa-wifi"></i>
<span class="device-name">Маршрутизатор</span>
</div>
<div class="device device-2" data-device="switch">
<i class="fas fa-network-wired"></i>
<span class="device-name">Сетевой коммутатор</span>
</div>
<div class="device device-3" data-device="pc">
<i class="fas fa-desktop"></i>
<span class="device-name">Рабочая станция</span>
</div>
<div class="device device-4" data-device="server">
<i class="fas fa-server"></i>
<span class="device-name">Сервер</span>
</div>
<div class="device device-5" data-device="main">
<i class="fas fa-hdd"></i>
<span class="device-name">Основное устройство</span>
</div>
</div>
</div>
<div class="instructions">
<h2 class="section-title"><i class="fas fa-list-ol"></i> Инструкция по подключению</h2>
<ol class="steps">
<li class="step">
<h3>Подготовка оборудования</h3>
<p>Убедитесь, что все устройства выключены. Проверьте наличие всех необходимых кабелей и аксессуаров.</p>
</li>
<li class="step">
<h3>Подключение маршрутизатора</h3>
<p>Соедините WAN-порт маршрутизатора с кабелем интернет-провайдера. Подключите блок питания к маршрутизатору.</p>
</li>
<li class="step">
<h3>Подключение коммутатора</h3>
<p>Соедините LAN-порт маршрутизатора с любым портом сетевого коммутатора с помощью <span class="highlight">патч-корда</span>.</p>
</li>
<li class="step">
<h3>Подключение устройств</h3>
<p>Подключите рабочую станцию, сервер и основное устройство к свободным портам коммутатора.</p>
</li>
<li class="step">
<h3>Настройка и проверка</h3>
<p>Включите все устройства. Проверьте индикацию на каждом устройстве и убедитесь в наличии сетевого соединения.</p>
</li>
</ol>
</div>
</div>
<div class="details">
<div class="detail-box">
<h2 class="section-title"><i class="fas fa-info-circle"></i> Технические характеристики</h2>
<div class="detail-item">
<span class="detail-label">Тип подключения:</span>
<span class="detail-value">Ethernet 1000BASE-T</span>
</div>
<div class="detail-item">
<span class="detail-label">Скорость передачи:</span>
<span class="detail-value">до 1 Гбит/с</span>
</div>
<div class="detail-item">
<span class="detail-label">Тип кабеля:</span>
<span class="detail-value">CAT 5e/6/6a</span>
</div>
<div class="detail-item">
<span class="detail-label">Макс. длина кабеля:</span>
<span class="detail-value">100 метров</span>
</div>
<div class="detail-item">
<span class="detail-label">Протоколы:</span>
<span class="detail-value">TCP/IP, DHCP, DNS</span>
</div>
</div>
<div class="detail-box">
<h2 class="section-title"><i class="fas fa-tools"></i> Необходимые компоненты</h2>
<div class="detail-item">
<span class="detail-label">Маршрутизатор:</span>
<span class="detail-value">1 шт.</span>
</div>
<div class="detail-item">
<span class="detail-label">Сетевой коммутатор:</span>
<span class="detail-value">1 шт. (8 портов)</span>
</div>
<div class="detail-item">
<span class="detail-label">Патч-корды:</span>
<span class="detail-value">4 шт.</span>
</div>
<div class="detail-item">
<span class="detail-label">Сетевые карты:</span>
<span class="detail-value">встроенные</span>
</div>
<div class="detail-item">
<span class="detail-label">Блоки питания:</span>
<span class="detail-value">4 шт.</span>
</div>
</div>
</div>
<footer>
<p>Схема подключения устройства | Создано для наглядного представления сетевой инфраструктуры</p>
<p>© 2023 Все права защищены. При использовании схемы убедитесь в соответствии техническим требованиям.</p>
</footer>
</div>
<script>
// Добавляем интерактивность для устройств
document.querySelectorAll('.device').forEach(device => {
device.addEventListener('click', function() {
const deviceName = this.querySelector('.device-name').textContent;
alert(`Вы выбрали: ${deviceName}\n\nЭто устройство подключено к основному устройству через сетевой коммутатор.`);
});
});
// Анимация подключений при загрузке страницы
document.addEventListener('DOMContentLoaded', function() {
const connections = document.querySelectorAll('.connection');
connections.forEach((conn, index) => {
// Начальное состояние - линии невидимы
conn.style.width = '0';
// Анимация появления линий с задержкой
setTimeout(() => {
conn.style.transition = 'width 1s ease-in-out';
if (index === 0) conn.style.width = '120px';
if (index === 1) conn.style.width = '120px';
if (index === 2) conn.style.width = '120px';
if (index === 3) conn.style.width = '120px';
}, 300 + index * 300);
});
});
</script>
</body>
</html>
+122
View File
@@ -0,0 +1,122 @@
using Renci.SshNet;
using System;
Dictionary<string, string> listSw = new Dictionary<string, string>
{
{"GE1/0/1", "kr1_sw1"},
{"GE1/0/2", "kr1_sw2"},
{"GE1/0/3", "kr1_sw3"},
{"GE1/0/4", "kr1_sw4"},
{"GE1/0/5", "kr1_sw5"},
{"GE1/0/6", "kr1_sw6"},
{"GE1/0/7", "kr2_sw1"},
{"GE1/0/8", "kr2_sw2"},
{"GE1/0/9", "kr2_sw3"},
{"GE1/0/10", "kr2_sw4"},
{"GE1/0/11", "kr2_sw5"},
{"GE1/0/12", "kr2_sw6"},
{"GE1/0/13", "kr2_sw7"},
{"GE1/0/14", "kr2_sw8"},
{"GE1/0/15", "kr2_sw9"},
{"GE1/0/16", "kr3_sw2"},
{"GE1/0/17", "kr3_sw1"},
{"GE1/0/18", "kr3_sw3"},
{"GE1/0/19", "kr3_sw4"},
{"GE1/0/20", "kr3_sw5"},
{"GE1/0/21", "kr3_sw6"},
{"GE1/0/22", "kr4_sw1"},
{"GE1/0/23", "kr4_sw2"},
{"GE1/0/24", "kr4_sw3"},
{"GE2/0/1", "kr4_sw4"},
{"GE2/0/2", "kr4_sw5"},
{"GE2/0/3", "kr4_sw6"},
{"GE2/0/4", "kr4_sw7"},
{"GE2/0/5", "kr4_sw8"},
{"GE2/0/6", "kr5_sw1"},
{"GE2/0/7", "kr6_sw1"},
{"GE2/0/8", "kr6_sw2"},
{"GE2/0/9", "kr7_sw1"},
{"GE2/0/10", "kr7_sw2"},
{"GE2/0/11", "kr8_sw1"},
{"GE2/0/12", "kr8_sw2"},
{"GE2/0/13", "kr9_sw1"},
{"GE2/0/14", "kr10_sw1"},
{"GE2/0/15", "kr10_sw2"},
{"GE2/0/16", "kr10_sw3"},
{"GE2/0/17", "kr11_sw1"},
{"GE2/0/18", "kr11_sw2"},
{"GE2/0/19", "kr11_sw3"},
{"GE2/0/20", "kr11_sw4"},
{"GE2/0/21", "kr12_sw1"},
{"GE2/0/22", "kr12_sw2"},
{"GE2/0/23", "kr13_sw1"},
{"GE2/0/24", "kr14_sw1"},
{"GE3/0/1", "kr14_sw2"},
{"GE3/0/2", "kr13_sw2"},
{"GE3/0/3", "kr15_sw1"},
{"GE3/0/4", "kr15_sw3"},
{"GE3/0/5", "kr15_sw2"},
{"GE3/0/6", "kr15_sw4"},
{"GE3/0/7", "kr15_sw5"},
{"GE3/0/8", "kr16_sw1"},
{"GE3/0/9", "kr16_sw2"},
{"GE3/0/10", "kr16_sw3"},
{"GE3/0/11", "kr16_sw4"},
{"GE3/0/12", "kr16_sw5"},
{"GE3/0/13", "kr16_sw6"},
{"GE3/0/14", "kr0_1_sw1"},
{"GE3/0/15", "kr0_1_sw2"},
{"GE3/0/16", "kr0_1_sw3"},
{"GE3/0/17", "kr0_1_sw4"},
{"GE3/0/18", "kr00_2_sw1"},
{"GE3/0/19", "kr00_2_sw2"},
{"GE3/0/20", "kr00_2_sw3"},
{"GE3/0/21", "kr0_2_sw4"}
};
List<string> listMac = new List<string>()
{
"2959",
"5c09",
"2827",
"84e8",
"848d",
"8413",
"88a0",
"0db0",
"8b4e"
};
string host = "172.16.48.4";
string username = "admin";
string password = "4NUDZhJ789";
int port = 22; // стандартный порт SSH
using (var client = new SshClient(host, port, username, password))
{
try
{
// Подключаемся
client.Connect();
Console.WriteLine("Подключение установлено!");
foreach (var mac in listMac)
{
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.ReadKey();
}
catch (Exception ex)
{
Console.WriteLine($"Ошибка: {ex.Message}");
}
finally
{
if (client.IsConnected)
{
client.Disconnect();
Console.WriteLine("Отключено.");
}
}
}
+790
View File
@@ -0,0 +1,790 @@
172.16.51.2
172.16.51.3
172.16.51.4
172.16.51.5
172.16.51.6
172.16.51.7
172.16.51.8
172.16.51.9
172.16.51.10
172.16.51.11
172.16.51.12
172.16.51.13
172.16.51.14
172.16.51.15
172.16.51.16
172.16.51.17
172.16.51.18
172.16.51.19
172.16.51.20
172.16.51.21
172.16.51.22
172.16.51.23
172.16.51.24
172.16.51.25
172.16.51.26
172.16.51.27
172.16.51.28
172.16.51.29
172.16.51.30
172.16.51.31
172.16.51.32
172.16.51.33
172.16.51.34
172.16.51.35
172.16.51.36
172.16.51.37
172.16.51.38
172.16.51.39
172.16.51.40
172.16.51.41
172.16.51.42
172.16.51.43
172.16.51.44
172.16.51.45
172.16.51.46
172.16.51.47
172.16.51.48
172.16.51.49
172.16.51.50
172.16.51.51
172.16.51.52
172.16.51.53
172.16.51.54
172.16.51.55
172.16.51.56
172.16.51.57
172.16.51.58
172.16.51.59
172.16.51.60
172.16.51.61
172.16.51.62
172.16.51.63
172.16.51.64
172.16.51.65
172.16.51.66
172.16.51.67
172.16.51.68
172.16.51.69
172.16.51.70
172.16.51.71
172.16.51.72
172.16.51.73
172.16.51.74
172.16.51.75
172.16.51.76
172.16.51.77
172.16.51.78
172.16.51.79
172.16.51.80
172.16.51.81
172.16.51.82
172.16.51.83
172.16.51.84
172.16.51.85
172.16.51.86
172.16.51.87
172.16.51.88
172.16.51.89
172.16.51.90
172.16.51.91
172.16.51.92
172.16.51.93
172.16.51.94
172.16.51.95
172.16.51.96
172.16.51.97
172.16.51.98
172.16.51.99
172.16.51.100
172.16.51.101
172.16.51.102
172.16.51.103
172.16.51.104
172.16.51.105
172.16.51.106
172.16.51.107
172.16.51.108
172.16.51.109
172.16.51.110
172.16.51.111
172.16.51.112
172.16.51.113
172.16.51.114
172.16.51.115
172.16.51.116
172.16.51.117
172.16.51.118
172.16.51.119
172.16.51.120
172.16.51.121
172.16.51.122
172.16.51.123
172.16.51.124
172.16.51.125
172.16.51.126
172.16.51.127
172.16.51.128
172.16.51.129
172.16.51.130
172.16.51.131
172.16.51.132
172.16.51.133
172.16.51.134
172.16.51.135
172.16.51.136
172.16.51.137
172.16.51.138
172.16.51.139
172.16.51.140
172.16.51.141
172.16.51.142
172.16.51.143
172.16.51.144
172.16.51.145
172.16.51.146
172.16.51.147
172.16.51.148
172.16.51.149
172.16.51.150
172.16.51.151
172.16.51.152
172.16.51.153
172.16.51.154
172.16.51.155
172.16.51.156
172.16.51.157
172.16.51.158
172.16.51.159
172.16.51.160
172.16.51.161
172.16.51.162
172.16.51.163
172.16.51.164
172.16.51.165
172.16.51.166
172.16.51.167
172.16.51.168
172.16.51.169
172.16.51.170
172.16.51.171
172.16.51.172
172.16.51.173
172.16.51.174
172.16.51.175
172.16.51.176
172.16.51.177
172.16.51.178
172.16.51.179
172.16.51.180
172.16.51.181
172.16.51.182
172.16.51.183
172.16.51.184
172.16.51.185
172.16.51.186
172.16.51.187
172.16.51.188
172.16.51.189
172.16.51.190
172.16.51.191
172.16.51.192
172.16.51.193
172.16.51.194
172.16.51.195
172.16.51.196
172.16.51.197
172.16.51.198
172.16.51.199
172.16.51.200
172.16.51.201
172.16.51.202
172.16.51.203
172.16.51.204
172.16.51.205
172.16.51.206
172.16.51.207
172.16.51.208
172.16.51.209
172.16.51.210
172.16.51.211
172.16.51.212
172.16.51.213
172.16.51.214
172.16.51.215
172.16.51.216
172.16.51.217
172.16.51.218
172.16.51.219
172.16.51.220
172.16.51.221
172.16.51.222
172.16.51.223
172.16.51.224
172.16.51.225
172.16.51.226
172.16.51.227
172.16.51.228
172.16.51.229
172.16.51.230
172.16.51.231
172.16.51.232
172.16.51.233
172.16.51.234
172.16.51.235
172.16.51.236
172.16.51.237
172.16.51.238
172.16.51.239
172.16.51.240
172.16.51.241
172.16.51.242
172.16.51.243
172.16.51.244
172.16.51.245
172.16.51.246
172.16.51.247
172.16.51.248
172.16.51.249
172.16.51.250
172.16.51.251
172.16.51.252
172.16.51.253
172.16.51.254
172.16.51.255
172.16.52.1
172.16.52.2
172.16.52.3
172.16.52.4
172.16.52.5
172.16.52.6
172.16.52.7
172.16.52.8
172.16.52.9
172.16.52.10
172.16.52.11
172.16.52.12
172.16.52.13
172.16.52.14
172.16.52.15
172.16.52.16
172.16.52.17
172.16.52.18
172.16.52.19
172.16.52.20
172.16.52.21
172.16.52.22
172.16.52.23
172.16.52.24
172.16.52.25
172.16.52.26
172.16.52.27
172.16.52.28
172.16.52.29
172.16.52.30
172.16.52.31
172.16.52.32
172.16.52.33
172.16.52.34
172.16.52.35
172.16.52.36
172.16.52.37
172.16.52.38
172.16.52.39
172.16.52.40
172.16.52.41
172.16.52.42
172.16.52.43
172.16.52.44
172.16.52.45
172.16.52.46
172.16.52.47
172.16.52.48
172.16.52.49
172.16.52.50
172.16.52.51
172.16.52.52
172.16.52.53
172.16.52.54
172.16.52.55
172.16.52.56
172.16.52.57
172.16.52.58
172.16.52.59
172.16.52.60
172.16.52.61
172.16.52.62
172.16.52.63
172.16.52.64
172.16.52.65
172.16.52.66
172.16.52.67
172.16.52.68
172.16.52.69
172.16.52.70
172.16.52.71
172.16.52.72
172.16.52.73
172.16.52.74
172.16.52.75
172.16.52.76
172.16.52.77
172.16.52.78
172.16.52.79
172.16.52.80
172.16.52.81
172.16.52.82
172.16.52.83
172.16.52.84
172.16.52.85
172.16.52.86
172.16.52.87
172.16.52.88
172.16.52.89
172.16.52.90
172.16.52.91
172.16.52.92
172.16.52.93
172.16.52.94
172.16.52.95
172.16.52.96
172.16.52.97
172.16.52.98
172.16.52.99
172.16.52.100
172.16.52.101
172.16.52.102
172.16.52.103
172.16.52.104
172.16.52.105
172.16.52.106
172.16.52.107
172.16.52.108
172.16.52.109
172.16.52.110
172.16.52.111
172.16.52.112
172.16.52.113
172.16.52.114
172.16.52.115
172.16.52.116
172.16.52.117
172.16.52.118
172.16.52.119
172.16.52.120
172.16.52.121
172.16.52.122
172.16.52.123
172.16.52.124
172.16.52.125
172.16.52.126
172.16.52.127
172.16.52.128
172.16.52.129
172.16.52.130
172.16.52.131
172.16.52.132
172.16.52.133
172.16.52.134
172.16.52.135
172.16.52.136
172.16.52.137
172.16.52.138
172.16.52.139
172.16.52.140
172.16.52.141
172.16.52.142
172.16.52.143
172.16.52.144
172.16.52.145
172.16.52.146
172.16.52.147
172.16.52.148
172.16.52.149
172.16.52.150
172.16.52.151
172.16.52.152
172.16.52.153
172.16.52.154
172.16.52.155
172.16.52.156
172.16.52.157
172.16.52.158
172.16.52.159
172.16.52.160
172.16.52.161
172.16.52.162
172.16.52.163
172.16.52.164
172.16.52.165
172.16.52.166
172.16.52.167
172.16.52.168
172.16.52.169
172.16.52.170
172.16.52.171
172.16.52.172
172.16.52.173
172.16.52.174
172.16.52.175
172.16.52.176
172.16.52.177
172.16.52.178
172.16.52.179
172.16.52.180
172.16.52.181
172.16.52.182
172.16.52.183
172.16.52.184
172.16.52.185
172.16.52.186
172.16.52.187
172.16.52.188
172.16.52.189
172.16.52.190
172.16.52.191
172.16.52.192
172.16.52.193
172.16.52.194
172.16.52.195
172.16.52.196
172.16.52.197
172.16.52.198
172.16.52.199
172.16.52.200
172.16.52.201
172.16.52.202
172.16.52.203
172.16.52.204
172.16.52.205
172.16.52.206
172.16.52.207
172.16.52.208
172.16.52.209
172.16.52.210
172.16.52.211
172.16.52.212
172.16.52.213
172.16.52.214
172.16.52.215
172.16.52.216
172.16.52.217
172.16.52.218
172.16.52.219
172.16.52.220
172.16.52.221
172.16.52.222
172.16.52.223
172.16.52.224
172.16.52.225
172.16.52.226
172.16.52.227
172.16.52.228
172.16.52.229
172.16.52.230
172.16.52.231
172.16.52.232
172.16.52.233
172.16.52.234
172.16.52.235
172.16.52.236
172.16.52.237
172.16.52.238
172.16.52.239
172.16.52.240
172.16.52.241
172.16.52.242
172.16.52.243
172.16.52.244
172.16.52.245
172.16.52.246
172.16.52.247
172.16.52.248
172.16.52.249
172.16.52.250
172.16.52.251
172.16.52.252
172.16.52.253
172.16.52.254
172.16.52.255
172.16.53.1
172.16.53.2
172.16.53.3
172.16.53.4
172.16.53.5
172.16.53.6
172.16.53.7
172.16.53.8
172.16.53.9
172.16.53.10
172.16.53.11
172.16.53.12
172.16.53.13
172.16.53.14
172.16.53.15
172.16.53.16
172.16.53.17
172.16.53.18
172.16.53.19
172.16.53.20
172.16.53.21
172.16.53.22
172.16.53.23
172.16.53.24
172.16.53.25
172.16.53.26
172.16.53.27
172.16.53.28
172.16.53.29
172.16.53.30
172.16.53.31
172.16.53.32
172.16.53.33
172.16.53.34
172.16.53.35
172.16.53.36
172.16.53.37
172.16.53.38
172.16.53.39
172.16.53.40
172.16.53.41
172.16.53.42
172.16.53.43
172.16.53.44
172.16.53.45
172.16.53.46
172.16.53.47
172.16.53.48
172.16.53.49
172.16.53.50
172.16.53.51
172.16.53.52
172.16.53.53
172.16.53.54
172.16.53.55
172.16.53.56
172.16.53.57
172.16.53.58
172.16.53.59
172.16.53.60
172.16.53.61
172.16.53.62
172.16.53.63
172.16.53.64
172.16.53.65
172.16.53.66
172.16.53.67
172.16.53.68
172.16.53.69
172.16.53.70
172.16.53.71
172.16.53.72
172.16.53.73
172.16.53.74
172.16.53.75
172.16.53.76
172.16.53.77
172.16.53.78
172.16.53.79
172.16.53.80
172.16.53.81
172.16.53.82
172.16.53.83
172.16.53.84
172.16.53.85
172.16.53.86
172.16.53.87
172.16.53.88
172.16.53.89
172.16.53.90
172.16.53.91
172.16.53.92
172.16.53.93
172.16.53.94
172.16.53.95
172.16.53.96
172.16.53.97
172.16.53.98
172.16.53.99
172.16.53.100
172.16.53.101
172.16.53.102
172.16.53.103
172.16.53.104
172.16.53.105
172.16.53.106
172.16.53.107
172.16.53.108
172.16.53.109
172.16.53.110
172.16.53.111
172.16.53.112
172.16.53.113
172.16.53.114
172.16.53.115
172.16.53.116
172.16.53.117
172.16.53.118
172.16.53.119
172.16.53.120
172.16.53.121
172.16.53.122
172.16.53.123
172.16.53.124
172.16.53.125
172.16.53.126
172.16.53.127
172.16.53.128
172.16.53.129
172.16.53.130
172.16.53.131
172.16.53.132
172.16.53.133
172.16.53.134
172.16.53.135
172.16.53.136
172.16.53.137
172.16.53.138
172.16.53.139
172.16.53.140
172.16.53.141
172.16.53.142
172.16.53.143
172.16.53.144
172.16.53.145
172.16.53.146
172.16.53.147
172.16.53.148
172.16.53.149
172.16.53.150
172.16.53.151
172.16.53.152
172.16.53.153
172.16.53.154
172.16.53.155
172.16.53.156
172.16.53.157
172.16.53.158
172.16.53.159
172.16.53.160
172.16.53.161
172.16.53.162
172.16.53.163
172.16.53.164
172.16.53.165
172.16.53.166
172.16.53.167
172.16.53.168
172.16.53.169
172.16.53.170
172.16.53.171
172.16.53.172
172.16.53.173
172.16.53.174
172.16.53.175
172.16.53.176
172.16.53.177
172.16.53.178
172.16.53.179
172.16.53.180
172.16.53.181
172.16.53.182
172.16.53.183
172.16.53.184
172.16.53.185
172.16.53.186
172.16.53.187
172.16.53.188
172.16.53.189
172.16.53.190
172.16.53.191
172.16.53.192
172.16.53.193
172.16.53.194
172.16.53.195
172.16.53.196
172.16.53.197
172.16.53.198
172.16.53.199
172.16.53.200
172.16.53.201
172.16.53.202
172.16.53.203
172.16.53.204
172.16.53.205
172.16.53.206
172.16.53.207
172.16.53.208
172.16.53.209
172.16.53.210
172.16.53.211
172.16.53.212
172.16.53.213
172.16.53.214
172.16.53.215
172.16.53.216
172.16.53.217
172.16.53.218
172.16.53.219
172.16.53.220
172.16.53.221
172.16.53.222
172.16.53.223
172.16.53.224
172.16.53.225
172.16.53.226
172.16.53.227
172.16.53.228
172.16.53.229
172.16.53.230
172.16.53.231
172.16.53.232
172.16.53.233
172.16.53.234
172.16.53.235
172.16.53.236
172.16.53.237
172.16.53.238
172.16.53.239
172.16.53.240
172.16.53.241
172.16.53.242
172.16.53.243
172.16.53.244
172.16.53.245
172.16.53.246
172.16.53.247
172.16.53.248
172.16.53.249
172.16.53.250
172.16.53.251
172.16.53.252
172.16.53.253
172.16.53.254
172.16.53.254
172.16.54.1
172.16.54.2
172.16.54.3
172.16.54.4
172.16.54.5
172.16.54.6
172.16.54.7
172.16.54.8
172.16.54.9
172.16.54.10
172.16.54.11
172.16.54.12
172.16.54.13
172.16.54.14
172.16.54.15
172.16.54.16
172.16.54.17
172.16.54.18
172.16.54.19
172.16.54.20
172.16.54.21
172.16.54.22
172.16.54.23
172.16.54.24
172.16.54.25
172.16.54.26
1 172.16.51.2
2 172.16.51.3
3 172.16.51.4
4 172.16.51.5
5 172.16.51.6
6 172.16.51.7
7 172.16.51.8
8 172.16.51.9
9 172.16.51.10
10 172.16.51.11
11 172.16.51.12
12 172.16.51.13
13 172.16.51.14
14 172.16.51.15
15 172.16.51.16
16 172.16.51.17
17 172.16.51.18
18 172.16.51.19
19 172.16.51.20
20 172.16.51.21
21 172.16.51.22
22 172.16.51.23
23 172.16.51.24
24 172.16.51.25
25 172.16.51.26
26 172.16.51.27
27 172.16.51.28
28 172.16.51.29
29 172.16.51.30
30 172.16.51.31
31 172.16.51.32
32 172.16.51.33
33 172.16.51.34
34 172.16.51.35
35 172.16.51.36
36 172.16.51.37
37 172.16.51.38
38 172.16.51.39
39 172.16.51.40
40 172.16.51.41
41 172.16.51.42
42 172.16.51.43
43 172.16.51.44
44 172.16.51.45
45 172.16.51.46
46 172.16.51.47
47 172.16.51.48
48 172.16.51.49
49 172.16.51.50
50 172.16.51.51
51 172.16.51.52
52 172.16.51.53
53 172.16.51.54
54 172.16.51.55
55 172.16.51.56
56 172.16.51.57
57 172.16.51.58
58 172.16.51.59
59 172.16.51.60
60 172.16.51.61
61 172.16.51.62
62 172.16.51.63
63 172.16.51.64
64 172.16.51.65
65 172.16.51.66
66 172.16.51.67
67 172.16.51.68
68 172.16.51.69
69 172.16.51.70
70 172.16.51.71
71 172.16.51.72
72 172.16.51.73
73 172.16.51.74
74 172.16.51.75
75 172.16.51.76
76 172.16.51.77
77 172.16.51.78
78 172.16.51.79
79 172.16.51.80
80 172.16.51.81
81 172.16.51.82
82 172.16.51.83
83 172.16.51.84
84 172.16.51.85
85 172.16.51.86
86 172.16.51.87
87 172.16.51.88
88 172.16.51.89
89 172.16.51.90
90 172.16.51.91
91 172.16.51.92
92 172.16.51.93
93 172.16.51.94
94 172.16.51.95
95 172.16.51.96
96 172.16.51.97
97 172.16.51.98
98 172.16.51.99
99 172.16.51.100
100 172.16.51.101
101 172.16.51.102
102 172.16.51.103
103 172.16.51.104
104 172.16.51.105
105 172.16.51.106
106 172.16.51.107
107 172.16.51.108
108 172.16.51.109
109 172.16.51.110
110 172.16.51.111
111 172.16.51.112
112 172.16.51.113
113 172.16.51.114
114 172.16.51.115
115 172.16.51.116
116 172.16.51.117
117 172.16.51.118
118 172.16.51.119
119 172.16.51.120
120 172.16.51.121
121 172.16.51.122
122 172.16.51.123
123 172.16.51.124
124 172.16.51.125
125 172.16.51.126
126 172.16.51.127
127 172.16.51.128
128 172.16.51.129
129 172.16.51.130
130 172.16.51.131
131 172.16.51.132
132 172.16.51.133
133 172.16.51.134
134 172.16.51.135
135 172.16.51.136
136 172.16.51.137
137 172.16.51.138
138 172.16.51.139
139 172.16.51.140
140 172.16.51.141
141 172.16.51.142
142 172.16.51.143
143 172.16.51.144
144 172.16.51.145
145 172.16.51.146
146 172.16.51.147
147 172.16.51.148
148 172.16.51.149
149 172.16.51.150
150 172.16.51.151
151 172.16.51.152
152 172.16.51.153
153 172.16.51.154
154 172.16.51.155
155 172.16.51.156
156 172.16.51.157
157 172.16.51.158
158 172.16.51.159
159 172.16.51.160
160 172.16.51.161
161 172.16.51.162
162 172.16.51.163
163 172.16.51.164
164 172.16.51.165
165 172.16.51.166
166 172.16.51.167
167 172.16.51.168
168 172.16.51.169
169 172.16.51.170
170 172.16.51.171
171 172.16.51.172
172 172.16.51.173
173 172.16.51.174
174 172.16.51.175
175 172.16.51.176
176 172.16.51.177
177 172.16.51.178
178 172.16.51.179
179 172.16.51.180
180 172.16.51.181
181 172.16.51.182
182 172.16.51.183
183 172.16.51.184
184 172.16.51.185
185 172.16.51.186
186 172.16.51.187
187 172.16.51.188
188 172.16.51.189
189 172.16.51.190
190 172.16.51.191
191 172.16.51.192
192 172.16.51.193
193 172.16.51.194
194 172.16.51.195
195 172.16.51.196
196 172.16.51.197
197 172.16.51.198
198 172.16.51.199
199 172.16.51.200
200 172.16.51.201
201 172.16.51.202
202 172.16.51.203
203 172.16.51.204
204 172.16.51.205
205 172.16.51.206
206 172.16.51.207
207 172.16.51.208
208 172.16.51.209
209 172.16.51.210
210 172.16.51.211
211 172.16.51.212
212 172.16.51.213
213 172.16.51.214
214 172.16.51.215
215 172.16.51.216
216 172.16.51.217
217 172.16.51.218
218 172.16.51.219
219 172.16.51.220
220 172.16.51.221
221 172.16.51.222
222 172.16.51.223
223 172.16.51.224
224 172.16.51.225
225 172.16.51.226
226 172.16.51.227
227 172.16.51.228
228 172.16.51.229
229 172.16.51.230
230 172.16.51.231
231 172.16.51.232
232 172.16.51.233
233 172.16.51.234
234 172.16.51.235
235 172.16.51.236
236 172.16.51.237
237 172.16.51.238
238 172.16.51.239
239 172.16.51.240
240 172.16.51.241
241 172.16.51.242
242 172.16.51.243
243 172.16.51.244
244 172.16.51.245
245 172.16.51.246
246 172.16.51.247
247 172.16.51.248
248 172.16.51.249
249 172.16.51.250
250 172.16.51.251
251 172.16.51.252
252 172.16.51.253
253 172.16.51.254
254 172.16.51.255
255 172.16.52.1
256 172.16.52.2
257 172.16.52.3
258 172.16.52.4
259 172.16.52.5
260 172.16.52.6
261 172.16.52.7
262 172.16.52.8
263 172.16.52.9
264 172.16.52.10
265 172.16.52.11
266 172.16.52.12
267 172.16.52.13
268 172.16.52.14
269 172.16.52.15
270 172.16.52.16
271 172.16.52.17
272 172.16.52.18
273 172.16.52.19
274 172.16.52.20
275 172.16.52.21
276 172.16.52.22
277 172.16.52.23
278 172.16.52.24
279 172.16.52.25
280 172.16.52.26
281 172.16.52.27
282 172.16.52.28
283 172.16.52.29
284 172.16.52.30
285 172.16.52.31
286 172.16.52.32
287 172.16.52.33
288 172.16.52.34
289 172.16.52.35
290 172.16.52.36
291 172.16.52.37
292 172.16.52.38
293 172.16.52.39
294 172.16.52.40
295 172.16.52.41
296 172.16.52.42
297 172.16.52.43
298 172.16.52.44
299 172.16.52.45
300 172.16.52.46
301 172.16.52.47
302 172.16.52.48
303 172.16.52.49
304 172.16.52.50
305 172.16.52.51
306 172.16.52.52
307 172.16.52.53
308 172.16.52.54
309 172.16.52.55
310 172.16.52.56
311 172.16.52.57
312 172.16.52.58
313 172.16.52.59
314 172.16.52.60
315 172.16.52.61
316 172.16.52.62
317 172.16.52.63
318 172.16.52.64
319 172.16.52.65
320 172.16.52.66
321 172.16.52.67
322 172.16.52.68
323 172.16.52.69
324 172.16.52.70
325 172.16.52.71
326 172.16.52.72
327 172.16.52.73
328 172.16.52.74
329 172.16.52.75
330 172.16.52.76
331 172.16.52.77
332 172.16.52.78
333 172.16.52.79
334 172.16.52.80
335 172.16.52.81
336 172.16.52.82
337 172.16.52.83
338 172.16.52.84
339 172.16.52.85
340 172.16.52.86
341 172.16.52.87
342 172.16.52.88
343 172.16.52.89
344 172.16.52.90
345 172.16.52.91
346 172.16.52.92
347 172.16.52.93
348 172.16.52.94
349 172.16.52.95
350 172.16.52.96
351 172.16.52.97
352 172.16.52.98
353 172.16.52.99
354 172.16.52.100
355 172.16.52.101
356 172.16.52.102
357 172.16.52.103
358 172.16.52.104
359 172.16.52.105
360 172.16.52.106
361 172.16.52.107
362 172.16.52.108
363 172.16.52.109
364 172.16.52.110
365 172.16.52.111
366 172.16.52.112
367 172.16.52.113
368 172.16.52.114
369 172.16.52.115
370 172.16.52.116
371 172.16.52.117
372 172.16.52.118
373 172.16.52.119
374 172.16.52.120
375 172.16.52.121
376 172.16.52.122
377 172.16.52.123
378 172.16.52.124
379 172.16.52.125
380 172.16.52.126
381 172.16.52.127
382 172.16.52.128
383 172.16.52.129
384 172.16.52.130
385 172.16.52.131
386 172.16.52.132
387 172.16.52.133
388 172.16.52.134
389 172.16.52.135
390 172.16.52.136
391 172.16.52.137
392 172.16.52.138
393 172.16.52.139
394 172.16.52.140
395 172.16.52.141
396 172.16.52.142
397 172.16.52.143
398 172.16.52.144
399 172.16.52.145
400 172.16.52.146
401 172.16.52.147
402 172.16.52.148
403 172.16.52.149
404 172.16.52.150
405 172.16.52.151
406 172.16.52.152
407 172.16.52.153
408 172.16.52.154
409 172.16.52.155
410 172.16.52.156
411 172.16.52.157
412 172.16.52.158
413 172.16.52.159
414 172.16.52.160
415 172.16.52.161
416 172.16.52.162
417 172.16.52.163
418 172.16.52.164
419 172.16.52.165
420 172.16.52.166
421 172.16.52.167
422 172.16.52.168
423 172.16.52.169
424 172.16.52.170
425 172.16.52.171
426 172.16.52.172
427 172.16.52.173
428 172.16.52.174
429 172.16.52.175
430 172.16.52.176
431 172.16.52.177
432 172.16.52.178
433 172.16.52.179
434 172.16.52.180
435 172.16.52.181
436 172.16.52.182
437 172.16.52.183
438 172.16.52.184
439 172.16.52.185
440 172.16.52.186
441 172.16.52.187
442 172.16.52.188
443 172.16.52.189
444 172.16.52.190
445 172.16.52.191
446 172.16.52.192
447 172.16.52.193
448 172.16.52.194
449 172.16.52.195
450 172.16.52.196
451 172.16.52.197
452 172.16.52.198
453 172.16.52.199
454 172.16.52.200
455 172.16.52.201
456 172.16.52.202
457 172.16.52.203
458 172.16.52.204
459 172.16.52.205
460 172.16.52.206
461 172.16.52.207
462 172.16.52.208
463 172.16.52.209
464 172.16.52.210
465 172.16.52.211
466 172.16.52.212
467 172.16.52.213
468 172.16.52.214
469 172.16.52.215
470 172.16.52.216
471 172.16.52.217
472 172.16.52.218
473 172.16.52.219
474 172.16.52.220
475 172.16.52.221
476 172.16.52.222
477 172.16.52.223
478 172.16.52.224
479 172.16.52.225
480 172.16.52.226
481 172.16.52.227
482 172.16.52.228
483 172.16.52.229
484 172.16.52.230
485 172.16.52.231
486 172.16.52.232
487 172.16.52.233
488 172.16.52.234
489 172.16.52.235
490 172.16.52.236
491 172.16.52.237
492 172.16.52.238
493 172.16.52.239
494 172.16.52.240
495 172.16.52.241
496 172.16.52.242
497 172.16.52.243
498 172.16.52.244
499 172.16.52.245
500 172.16.52.246
501 172.16.52.247
502 172.16.52.248
503 172.16.52.249
504 172.16.52.250
505 172.16.52.251
506 172.16.52.252
507 172.16.52.253
508 172.16.52.254
509 172.16.52.255
510 172.16.53.1
511 172.16.53.2
512 172.16.53.3
513 172.16.53.4
514 172.16.53.5
515 172.16.53.6
516 172.16.53.7
517 172.16.53.8
518 172.16.53.9
519 172.16.53.10
520 172.16.53.11
521 172.16.53.12
522 172.16.53.13
523 172.16.53.14
524 172.16.53.15
525 172.16.53.16
526 172.16.53.17
527 172.16.53.18
528 172.16.53.19
529 172.16.53.20
530 172.16.53.21
531 172.16.53.22
532 172.16.53.23
533 172.16.53.24
534 172.16.53.25
535 172.16.53.26
536 172.16.53.27
537 172.16.53.28
538 172.16.53.29
539 172.16.53.30
540 172.16.53.31
541 172.16.53.32
542 172.16.53.33
543 172.16.53.34
544 172.16.53.35
545 172.16.53.36
546 172.16.53.37
547 172.16.53.38
548 172.16.53.39
549 172.16.53.40
550 172.16.53.41
551 172.16.53.42
552 172.16.53.43
553 172.16.53.44
554 172.16.53.45
555 172.16.53.46
556 172.16.53.47
557 172.16.53.48
558 172.16.53.49
559 172.16.53.50
560 172.16.53.51
561 172.16.53.52
562 172.16.53.53
563 172.16.53.54
564 172.16.53.55
565 172.16.53.56
566 172.16.53.57
567 172.16.53.58
568 172.16.53.59
569 172.16.53.60
570 172.16.53.61
571 172.16.53.62
572 172.16.53.63
573 172.16.53.64
574 172.16.53.65
575 172.16.53.66
576 172.16.53.67
577 172.16.53.68
578 172.16.53.69
579 172.16.53.70
580 172.16.53.71
581 172.16.53.72
582 172.16.53.73
583 172.16.53.74
584 172.16.53.75
585 172.16.53.76
586 172.16.53.77
587 172.16.53.78
588 172.16.53.79
589 172.16.53.80
590 172.16.53.81
591 172.16.53.82
592 172.16.53.83
593 172.16.53.84
594 172.16.53.85
595 172.16.53.86
596 172.16.53.87
597 172.16.53.88
598 172.16.53.89
599 172.16.53.90
600 172.16.53.91
601 172.16.53.92
602 172.16.53.93
603 172.16.53.94
604 172.16.53.95
605 172.16.53.96
606 172.16.53.97
607 172.16.53.98
608 172.16.53.99
609 172.16.53.100
610 172.16.53.101
611 172.16.53.102
612 172.16.53.103
613 172.16.53.104
614 172.16.53.105
615 172.16.53.106
616 172.16.53.107
617 172.16.53.108
618 172.16.53.109
619 172.16.53.110
620 172.16.53.111
621 172.16.53.112
622 172.16.53.113
623 172.16.53.114
624 172.16.53.115
625 172.16.53.116
626 172.16.53.117
627 172.16.53.118
628 172.16.53.119
629 172.16.53.120
630 172.16.53.121
631 172.16.53.122
632 172.16.53.123
633 172.16.53.124
634 172.16.53.125
635 172.16.53.126
636 172.16.53.127
637 172.16.53.128
638 172.16.53.129
639 172.16.53.130
640 172.16.53.131
641 172.16.53.132
642 172.16.53.133
643 172.16.53.134
644 172.16.53.135
645 172.16.53.136
646 172.16.53.137
647 172.16.53.138
648 172.16.53.139
649 172.16.53.140
650 172.16.53.141
651 172.16.53.142
652 172.16.53.143
653 172.16.53.144
654 172.16.53.145
655 172.16.53.146
656 172.16.53.147
657 172.16.53.148
658 172.16.53.149
659 172.16.53.150
660 172.16.53.151
661 172.16.53.152
662 172.16.53.153
663 172.16.53.154
664 172.16.53.155
665 172.16.53.156
666 172.16.53.157
667 172.16.53.158
668 172.16.53.159
669 172.16.53.160
670 172.16.53.161
671 172.16.53.162
672 172.16.53.163
673 172.16.53.164
674 172.16.53.165
675 172.16.53.166
676 172.16.53.167
677 172.16.53.168
678 172.16.53.169
679 172.16.53.170
680 172.16.53.171
681 172.16.53.172
682 172.16.53.173
683 172.16.53.174
684 172.16.53.175
685 172.16.53.176
686 172.16.53.177
687 172.16.53.178
688 172.16.53.179
689 172.16.53.180
690 172.16.53.181
691 172.16.53.182
692 172.16.53.183
693 172.16.53.184
694 172.16.53.185
695 172.16.53.186
696 172.16.53.187
697 172.16.53.188
698 172.16.53.189
699 172.16.53.190
700 172.16.53.191
701 172.16.53.192
702 172.16.53.193
703 172.16.53.194
704 172.16.53.195
705 172.16.53.196
706 172.16.53.197
707 172.16.53.198
708 172.16.53.199
709 172.16.53.200
710 172.16.53.201
711 172.16.53.202
712 172.16.53.203
713 172.16.53.204
714 172.16.53.205
715 172.16.53.206
716 172.16.53.207
717 172.16.53.208
718 172.16.53.209
719 172.16.53.210
720 172.16.53.211
721 172.16.53.212
722 172.16.53.213
723 172.16.53.214
724 172.16.53.215
725 172.16.53.216
726 172.16.53.217
727 172.16.53.218
728 172.16.53.219
729 172.16.53.220
730 172.16.53.221
731 172.16.53.222
732 172.16.53.223
733 172.16.53.224
734 172.16.53.225
735 172.16.53.226
736 172.16.53.227
737 172.16.53.228
738 172.16.53.229
739 172.16.53.230
740 172.16.53.231
741 172.16.53.232
742 172.16.53.233
743 172.16.53.234
744 172.16.53.235
745 172.16.53.236
746 172.16.53.237
747 172.16.53.238
748 172.16.53.239
749 172.16.53.240
750 172.16.53.241
751 172.16.53.242
752 172.16.53.243
753 172.16.53.244
754 172.16.53.245
755 172.16.53.246
756 172.16.53.247
757 172.16.53.248
758 172.16.53.249
759 172.16.53.250
760 172.16.53.251
761 172.16.53.252
762 172.16.53.253
763 172.16.53.254
764 172.16.53.254
765 172.16.54.1
766 172.16.54.2
767 172.16.54.3
768 172.16.54.4
769 172.16.54.5
770 172.16.54.6
771 172.16.54.7
772 172.16.54.8
773 172.16.54.9
774 172.16.54.10
775 172.16.54.11
776 172.16.54.12
777 172.16.54.13
778 172.16.54.14
779 172.16.54.15
780 172.16.54.16
781 172.16.54.17
782 172.16.54.18
783 172.16.54.19
784 172.16.54.20
785 172.16.54.21
786 172.16.54.22
787 172.16.54.23
788 172.16.54.24
789 172.16.54.25
790 172.16.54.26
+20
View File
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SSH.NET" Version="2025.1.0" />
</ItemGroup>
<ItemGroup>
<None Update="listCam.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
+10
View File
@@ -0,0 +1,10 @@
<Solution>
<Project Path="AddHostToProxy/AddHostToProxy.csproj" Id="3dc81096-172f-420c-85b1-d7af5e6caf5c" />
<Project Path="CheckEVS/CheckEVS.csproj" />
<Project Path="CheckTimeHikvision/CheckTimeHikvision.csproj" Id="5cbd52dc-caba-426b-9b32-1583f10f60a2" />
<Project Path="ChekTimeDahua/ChekTimeDahua.csproj" Id="e570bdbe-62ad-476b-b36c-5f6ecf3028b1" />
<Project Path="DahuaIPCRename/DahuaIPCRename.csproj" Id="1e5671da-7b44-4818-8942-d73d2148c853" />
<Project Path="lsConsole/lsConsole.csproj" />
<Project Path="SwitchDahua/SwitchDahua.csproj" Id="12504b58-758f-444b-a79b-4ce2db8398cc" />
<Project Path="Wiking/Wiking.csproj" Id="fa0eb4bd-8bfb-4873-bb71-1c2a608ab911" />
</Solution>