Release v1.2.3

This commit is contained in:
yuanyuanxiang
2026-01-21 18:18:02 +01:00
parent 6a1e0810ab
commit 895ac3f54c
17 changed files with 140 additions and 13 deletions

Binary file not shown.

View File

@@ -29,7 +29,12 @@ public:
virtual std::string GetPeerName() const override
{
char client_ip[INET_ADDRSTRLEN];
#if (defined(_WIN32_WINNT) && _WIN32_WINNT <= 0x0501)
strncpy(client_ip, inet_ntoa(clientAddr.sin_addr), INET_ADDRSTRLEN - 1);
client_ip[INET_ADDRSTRLEN - 1] = '\0';
#else
inet_ntop(AF_INET, &clientAddr.sin_addr, client_ip, INET_ADDRSTRLEN);
#endif
return client_ip;
}
virtual int GetPort() const override

View File

@@ -731,7 +731,12 @@ public:
virtual std::string GetPeerName() const override
{
char client_ip[INET_ADDRSTRLEN];
#if (defined(_WIN32_WINNT) && _WIN32_WINNT <= 0x0501)
strncpy(client_ip, inet_ntoa(clientAddr.sin_addr), INET_ADDRSTRLEN - 1);
client_ip[INET_ADDRSTRLEN - 1] = '\0';
#else
inet_ntop(AF_INET, &clientAddr.sin_addr, client_ip, INET_ADDRSTRLEN);
#endif
return client_ip;
}
virtual int GetPort() const override

View File

@@ -17,6 +17,7 @@
#include <wincrypt.h>
#include <iostream>
#include "common/commands.h"
#include <algorithm>
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "bcrypt.lib")
@@ -85,8 +86,8 @@ std::string execCommand(const char* cmd)
SAFE_CLOSE_HANDLE(pi.hThread);
// 去除换行符和空格
result.erase(remove(result.begin(), result.end(), '\n'), result.end());
result.erase(remove(result.begin(), result.end(), '\r'), result.end());
result.erase(std::remove(result.begin(), result.end(), '\n'), result.end());
result.erase(std::remove(result.begin(), result.end(), '\r'), result.end());
// 返回命令的输出结果
return result.empty() ? "ERROR" : result;

View File

@@ -81,7 +81,7 @@
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<OutputFile>$(SolutionDir)Bin\Plugins\$(TargetName)$(TargetExt)</OutputFile>
</Link>
</ItemDefinitionGroup>