Compare commits

..

10 Commits
v2.0.1 ... main

Author SHA1 Message Date
simplxs
f004ee1f91
macos (broken
Some checks failed
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (x64, windows-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (arm64, ubuntu-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (x64, ubuntu-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (arm64, macos-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (x64, macos-latest) (push) Has been cancelled
2024-10-03 20:47:36 +08:00
Simplxs
a5412fc169
Update sign.cpp 2024-10-03 19:26:14 +08:00
Simplxs
fe0a01f45e
Update build.yml
Some checks failed
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (x64, windows-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (arm64, ubuntu-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (x64, ubuntu-latest) (push) Has been cancelled
2024-09-02 23:27:18 +08:00
Simplxs
0fd58af2ea
Update sign.cpp 2024-09-02 23:19:06 +08:00
Simplxs
2237d81dba
Update 9.9.12-26466
Some checks failed
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (x64, windows-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (arm64, ubuntu-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (x64, ubuntu-latest) (push) Has been cancelled
2024-07-30 01:24:32 +08:00
Simplxs
6f78a9e295
Update 9.9.12-26299
Some checks failed
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (x64, windows-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (arm64, ubuntu-latest) (push) Has been cancelled
build / run on ${{ matrix.os }}(${{ matrix.arch }}) (x64, ubuntu-latest) (push) Has been cancelled
2024-07-24 12:27:51 +08:00
Simplxs
e31a7a02b5
add 3.2.10-25765 2024-07-13 21:59:14 +08:00
Simplxs
2dd0524050
Update 9.9.12-25765 2024-07-13 14:44:31 +08:00
Simplxs
cf90133c25
add 9.9.12-25493 2024-07-06 14:16:42 +08:00
simplxs
57fc689784
fix load.js 2024-07-02 19:42:35 +08:00
9 changed files with 95 additions and 17 deletions

View File

@ -45,12 +45,13 @@ jobs:
- name: Upload build - name: Upload build
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}.zip name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}
path: | path: |
SignerServer.dll SignerServer.dll
load.js load.js
start.sh start.sh
start.bat start.bat
start.command
ubuntu: ubuntu:
name: run on ${{ matrix.os }}(${{ matrix.arch }}) name: run on ${{ matrix.os }}(${{ matrix.arch }})
@ -87,9 +88,54 @@ jobs:
- name: Upload build - name: Upload build
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}.zip name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}
path: | path: |
libSignerServer.so libSignerServer.so
load.js load.js
start.sh start.sh
start.bat start.bat
start.command
macos:
name: run on ${{ matrix.os }}(${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
arch: [x64, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup cmake
uses: lukka/get-cmake@latest
- name: Build project
uses: lukka/run-cmake@v10
with:
# This is the default path to the CMakeLists.txt along side the
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json
# located elsewhere.
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
# This is the name of the CMakePresets.json's configuration to use to generate
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
# run vcpkg and install all dependencies specified in vcpkg.json.
configurePreset: 'ninja'
# This is the name of the CMakePresets.json's configuration to build the project.
buildPreset: 'ninja-release'
- run: mv build/ninja/libSignerServer.dylib libSignerServer.dylib
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: SignerServer-${{ matrix.os }}-${{ matrix.arch }}
path: |
libSignerServer.dylib
load.js
start.sh
start.bat
start.command

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
.vscode .vscode
build build
*.so *.so
*.dll *.dll
*.dylib

View File

@ -1,4 +1,4 @@
# v2.0.0 # SignerServer
QQ Version: Windows 9.9.11-24815 / Linux 3.2.9-24815 QQ Version: Windows 9.9.11-24815 / Linux 3.2.9-24815

View File

@ -18,7 +18,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "
add_definitions(-D _X64_ARCH_) add_definitions(-D _X64_ARCH_)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86") elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
add_definitions(-D _X86_ARCH_) add_definitions(-D _X86_ARCH_)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64") elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
add_definitions(-D _ARM64_ARCH_) add_definitions(-D _ARM64_ARCH_)
endif() endif()

12
load.js
View File

@ -3,16 +3,18 @@ const os = require('node:os');
const exePath = path.dirname(process.execPath); const exePath = path.dirname(process.execPath);
let QQWrapper, appid, qua; let QQWrapper, version, appid, qua;
if (os.platform() === "win32") { if (os.platform() === "win32") {
const versionConfig = require(path.join(exePath, "resources/app/versions/config.json")); const versionConfig = require(path.join(exePath, "resources/app/versions/config.json"));
QQWrapper = require(path.join(exePath, "resources/app/versions", versionConfig.curVersion, "wrapper.node")); version = versionConfig.curVersion;
QQWrapper = require(path.join(exePath, "resources/app/versions", version, "wrapper.node"));
appid = "537226655"; // 9.9.12-25234 appid = "537226655"; // 9.9.12-25234
qua = `V1_WIN_NQ_${versionConfig.curVersion.replace("-", "_")}_GW_B`; qua = `V1_WIN_NQ_${version.replace("-", "_")}_GW_B`;
} else { } else {
const qqPkgInfo = require(path.join(exePath, "resources/app/package.json")); const qqPkgInfo = require(path.join(exePath, "resources/app/package.json"));
QQWrapper = require(path.join(exePath, "resources/app/wrapper.node")); QQWrapper = require(path.join(exePath, "resources/app/wrapper.node"));
version = qqPkgInfo.version;
appid = "537226441"; appid = "537226441";
qua = qqPkgInfo.qua; qua = qqPkgInfo.qua;
} }
@ -43,7 +45,7 @@ engine.initWithDeskTopConfig({
base_path_prefix: "", base_path_prefix: "",
platform_type: 3, platform_type: 3,
app_type: 4, app_type: 4,
app_version: qqPkgInfo.version, app_version: version,
os_version: os.release(), os_version: os.release(),
use_xlog: true, use_xlog: true,
qua: qua, qua: qua,
@ -59,6 +61,6 @@ loginService.initConfig({
appid: appid, appid: appid,
platVer: os.release(), platVer: os.release(),
commonPath: dataPathGlobal, commonPath: dataPathGlobal,
clientVer: qqPkgInfo.version, clientVer: version,
hostName: os.hostname() hostName: os.hostname()
}); });

View File

@ -34,6 +34,24 @@ void init()
} }
#elif defined(_MAC_PLATFORM_) #elif defined(_MAC_PLATFORM_)
std::string version = "6.9.19-16183"; std::string version = "6.9.19-16183";
try
{
std::ifstream versionConfig("/Applications/QQ.app/Contents/resources/app/package.json");
if (versionConfig.is_open())
{
std::stringstream versionConfigStrBuf;
versionConfigStrBuf << versionConfig.rdbuf();
versionConfig.close();
rapidjson::Document doc;
doc.Parse(versionConfigStrBuf.str().c_str(), versionConfigStrBuf.str().size());
if (doc.HasMember("version") && doc["version"].IsString())
version = doc["version"].GetString();
}
}
catch (const std::exception &e)
{
std::cerr << e.what() << '\n';
}
#elif defined(_LINUX_PLATFORM_) #elif defined(_LINUX_PLATFORM_)
std::string version = "3.2.9-24815"; std::string version = "3.2.9-24815";
try try
@ -141,12 +159,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
return TRUE; return TRUE;
} }
#elif defined(_LINUX_PLATFORM_) || defined(_MAC_PLATFORM_) #elif defined(_LINUX_PLATFORM_) || defined(_MAC_PLATFORM_)
void __attribute__((constructor)) my_init(void) static void __attribute__((constructor)) my_init(void)
{ {
init(); init();
} }
void __attribute__((destructor)) my_fini(void) static void __attribute__((destructor)) my_fini(void)
{ {
uninit(); uninit();
} }

View File

@ -48,8 +48,8 @@ void Server::Init()
.Get("/sign", [this](const httplib::Request &req, httplib::Response &res) .Get("/sign", [this](const httplib::Request &req, httplib::Response &res)
{ {
try { try {
std::string_view cmd = req.get_param_value("cmd"); std::string cmd = req.get_param_value("cmd");
std::string_view src = req.get_param_value("src"); std::string src = req.get_param_value("src");
int seq = std::stoi(req.get_param_value("seq")); int seq = std::stoi(req.get_param_value("seq"));
std::string buffer = GetSign(cmd, src, seq); std::string buffer = GetSign(cmd, src, seq);

View File

@ -22,6 +22,7 @@ std::map<std::string, uint64_t> addrMap = {
{"3.1.2-13107", 0x33C3920}, {"3.1.2-13107", 0x33C3920},
{"3.2.7-23361", 0x4C93C57}, {"3.2.7-23361", 0x4C93C57},
{"3.2.9-24815", 0x4E5D3B7}, {"3.2.9-24815", 0x4E5D3B7},
{"3.2.10-25765", 0x4F176D6},
// Macos // Macos
{"6.9.19-16183", 0x1B29469}, {"6.9.19-16183", 0x1B29469},
// Windows // Windows
@ -33,15 +34,21 @@ std::map<std::string, uint64_t> addrMap = {
{"9.9.11-24568", 0xAA1A20}, {"9.9.11-24568", 0xAA1A20},
{"9.9.11-24815", 0xAB5510}, {"9.9.11-24815", 0xAB5510},
{"9.9.12-25234", 0xA84980}, {"9.9.12-25234", 0xA84980},
{"9.9.12-25300", 0xA84980}}; {"9.9.12-25300", 0xA84980},
{"9.9.12-25493", 0xA996E0},
{"9.9.12-25765", 0xA9CE90},
{"9.9.12-26299", 0xA9E5B0},
{"9.9.12-26299", 0xA9E5B0},
{"9.9.15-27597", 0xBDAE40}};
#elif defined(_X86_ARCH_) #elif defined(_X86_ARCH_)
std::map<std::string, uint64_t> addrMap = { std::map<std::string, uint64_t> addrMap = {
{"9.9.2-15962", 0x2BD70}, {"9.9.2-15962", 0x2BD70},
{"9.9.2-16183", 0x2BD70}}; {"9.9.2-16183", 0x2BD70}};
#elif defined(_ARM64_ARCH_) #elif defined(_ARM64_ARCH_)
std::map<std::string, uint64_t> addrMap = { std::map<std::string, uint64_t> addrMap = {
{"3.2.7-23361", 0x351EC98} {"3.2.7-23361", 0x351EC98},
{"6.9.20-17153", 0x1c73dd0}}; {"6.9.20-17153", 0x1c73dd0},
{"6.9.56-28418", 0x23510E8}};
#endif #endif
int SignOffsets = 767; // 562 before 3.1.2-13107, 767 in others int SignOffsets = 767; // 562 before 3.1.2-13107, 767 in others

4
start.command Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
SCRIPT_DIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
export ELECTRON_RUN_AS_NODE=1
DYLD_INSERT_LIBRARIES=./libSignerServer.dylib /Applications/QQ.app/Contents/MacOS/qq ${SCRIPT_DIR}/load.js $@