diff --git a/libs/SafetyDog/api_dsp_windows.dll b/libs/SafetyDog/api_dsp_windows.dll
new file mode 100644
index 0000000..f46e26a
Binary files /dev/null and b/libs/SafetyDog/api_dsp_windows.dll differ
diff --git a/libs/SafetyDog/api_dsp_windows_x64.dll b/libs/SafetyDog/api_dsp_windows_x64.dll
new file mode 100644
index 0000000..76e03e7
Binary files /dev/null and b/libs/SafetyDog/api_dsp_windows_x64.dll differ
diff --git a/libs/SafetyDog/dog_net_windows.dll b/libs/SafetyDog/dog_net_windows.dll
new file mode 100644
index 0000000..cf37120
Binary files /dev/null and b/libs/SafetyDog/dog_net_windows.dll differ
diff --git a/libs/SafetyDog/dog_windows_3153818.dll b/libs/SafetyDog/dog_windows_3153818.dll
new file mode 100644
index 0000000..e66f083
Binary files /dev/null and b/libs/SafetyDog/dog_windows_3153818.dll differ
diff --git a/libs/SafetyDog/dog_windows_x64_3153818.dll b/libs/SafetyDog/dog_windows_x64_3153818.dll
new file mode 100644
index 0000000..798884d
Binary files /dev/null and b/libs/SafetyDog/dog_windows_x64_3153818.dll differ
diff --git a/src/XKRS.Common.Model/Authority/AuthorityCheck.cs b/src/XKRS.Common.Model/Authority/AuthorityCheck.cs
index fdbd240..53b5c00 100644
--- a/src/XKRS.Common.Model/Authority/AuthorityCheck.cs
+++ b/src/XKRS.Common.Model/Authority/AuthorityCheck.cs
@@ -7,6 +7,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Win32;
+using SuperDog;
namespace XKRS.Common.Model.Authority
{
@@ -16,7 +17,7 @@ namespace XKRS.Common.Model.Authority
public static UdpClient RemoteCheckClient = null;//提供用户数据报协议(Udp)网络服务
static byte[] CHECKBUFFER = null;
static IPEndPoint AuthorityServer = null;//将网络终结点表示为IP地址和端口号
- public static bool IsAuthorityOK { get; set; } = false;//是否批准静态属性 默认初值为false
+ public static bool IsAuthorityOK { get; set; } = false;//是否批准 静态属性 默认初值为false
static bool _isCheckAuthorityNecessary = true;
static AuthorityCheck()
@@ -38,7 +39,7 @@ namespace XKRS.Common.Model.Authority
{
AuthorityCheckOperation();
}
- public static void AuthorityCheckOperartion()
+ public static void AuthorityCheckOperation()
{
if (!_isCheckAuthorityNecessary)
{
@@ -46,8 +47,35 @@ namespace XKRS.Common.Model.Authority
}
else
{
- DogFeature feature = new DogFeature();
+ DogFeature feature = new DogFeature(1);
+ DogStatus status = DogStatus.StatusOk;
+ using(var dog=new Dog(feature))
+ {
+ string vendorCodes = "FIgWctNxfC4kOOrFk52ktOm6JBRreMTI2ckQRUwjJmzstXN2awbyKGfjdlWcKFpjMiJRwirzPlJKSThN1nC7axSY4Y9l5+aRzCYI8WoYFmtx4zBx2n1fQ9Rb/CGk99Z9mM5mpZQVH+PGmZGsEjfSBdY12HjIcPVHGmMyecskMlhIGxDqUg8ndCk8/0fqexKbQCffDiGAPbxZgxKlRAnxJFOwd1V2Hmq3Iln1YNhyRRbgudU7kPCY/RsxBKXtL4wym96d2jQNDcKV8A5Anb4UlSLbac7OcrCZEBSUTpMjyDYRvDWFWTmfVKX9/vuI4VvKjr2t/wt01Nu0tQ0a4AVtQZk+l13WZkwkkeOUh6gtvVFJZH61hpwhOOjnN9dNw8WSYBYC/NyaMjiv7yRVHt9K/Bs76T8I0ias55BP1GXe6C+zGJ9KXK+baCLojMTObj3Bs9JFhDwEDgEjRDCxz9POZnE3XPe/2ET4KbRP5cXZsX7rxbnwQ33E/cKcG1hidG3RTLu7d+IRob9vgpeeUYXB8OHSoReJBsjhJEWBCDko9YnTb1FcO0YwPQdxW0BaVf1n6XAXlPUA6cGP552Kp3F0pcIxVKKGpYUeDL7oIFQrtnJ5aW7mB+/c35BDTCueM8wQIJ3b2KOI+lueC+dbhpHffVgtPnrh/atxcZxUoM2/KxjvniCYtUOKbeYh8Gqn1MDk1bAO2B9KNBrbGuWJpgDTfZunE/ZVtd09clExYJ8NW2Lw6pfNB3nbh1MlRUmmhQPIDubOnjiaBVbCQGF6Nm4/M0aIywSPJCMPaXK0sso5v+EDM4frryOPkvBEAbDyIuU+yQkO9vnYggKLAezyxZNxVqQgXcMaS0WyJxZxjFku7/Os8YU5z54DeOu6zDRD4zAjUKT7JIQcJKvtYGVB5lvirKDqISzDjsHcq4NJyQbQzg462y9o90ljUwCCMJrBmOw4NHpYKTNypN8aCsYmiebwag==";
+ status = dog.Login(vendorCodes, "");
+ }
+ if (status == DogStatus.StatusOk)
+ {
+ IsAuthorityOK = true;
+ }
+ else
+ {
+ IsAuthorityOK = false;
+ try
+ {
+ RemoteCheckClient.Send(CHECKBUFFER, CHECKBUFFER.Length, AuthorityServer);
+ IPEndPoint ep = null;
+ var recBuffer = RemoteCheckClient.Receive(ref ep);
+ var recStr = Encoding.UTF8.GetString(recBuffer);
+ IsAuthorityOK = (recStr == "AuthorityOK");
+ }
+ catch(Exception ex)
+ {
+ Console.WriteLine($"远程权限检测失败,{ex.Message}");
+ }
+ }
}
+ return IsAuthorityOK;
}
}
diff --git a/src/XKRS.Common.Model/XKRS.Common.Model.csproj b/src/XKRS.Common.Model/XKRS.Common.Model.csproj
index ce7531c..d2f7a70 100644
--- a/src/XKRS.Common.Model/XKRS.Common.Model.csproj
+++ b/src/XKRS.Common.Model/XKRS.Common.Model.csproj
@@ -55,6 +55,10 @@
+
+ False
+ ..\..\libs\SafetyDog\dog_net_windows.dll
+