From 45dedb4872570d7e773e4ca8a1762e9019c6ba2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sun, 15 Sep 2024 09:35:10 +0800 Subject: [PATCH 1/8] fix: 28060 --- src/common/helper.ts | 6 +++--- src/common/qq-basic-info.ts | 28 +++++++++++++++------------- src/core/index.ts | 5 +++-- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/common/helper.ts b/src/common/helper.ts index c758c3a9..198c44da 100644 --- a/src/common/helper.ts +++ b/src/common/helper.ts @@ -179,18 +179,18 @@ export function getDefaultQQVersionConfigInfo(): QQVersionConfigType { }; } -export function getQQPackageInfoPath(exePath: string = ''): string { +export function getQQPackageInfoPath(exePath: string = '', version: string): string { if (os.platform() === 'darwin') { return path.join(path.dirname(exePath), '..', 'Resources', 'app', 'package.json'); } else { - return path.join(path.dirname(exePath), 'resources', 'app', 'package.json'); + return path.join(path.dirname(exePath), './versions/9.9.15-28060/resources/app/package.json'); } } export function getQQVersionConfigPath(exePath: string = ''): string | undefined { let configVersionInfoPath; if (os.platform() === 'win32') { - configVersionInfoPath = path.join(path.dirname(exePath), 'resources', 'app', 'versions', 'config.json'); + configVersionInfoPath = path.join(path.dirname(exePath), 'versions', 'config.json'); } else if (os.platform() === 'darwin') { const userPath = os.homedir(); const appDataPath = path.resolve(userPath, './Library/Application Support/QQ'); diff --git a/src/common/qq-basic-info.ts b/src/common/qq-basic-info.ts index 4184902b..91570676 100644 --- a/src/common/qq-basic-info.ts +++ b/src/common/qq-basic-info.ts @@ -19,14 +19,16 @@ export class QQBasicInfoWrapper { //基础目录获取 this.context = context; this.QQMainPath = process.execPath; - this.QQPackageInfoPath = getQQPackageInfoPath(this.QQMainPath); this.QQVersionConfigPath = getQQVersionConfigPath(this.QQMainPath); + //基础信息获取 无快更则启用默认模板填充 this.isQuickUpdate = !!this.QQVersionConfigPath; this.QQVersionConfig = this.isQuickUpdate ? JSON.parse(fs.readFileSync(this.QQVersionConfigPath!).toString()) : getDefaultQQVersionConfigInfo(); + + this.QQPackageInfoPath = getQQPackageInfoPath(this.QQMainPath, this.QQVersionConfig?.curVersion!); this.QQPackageInfo = JSON.parse(fs.readFileSync(this.QQPackageInfoPath).toString()); const { appid: IQQVersionAppid, qua: IQQVersionQua } = this.getAppidV2(); this.QQVersionAppid = IQQVersionAppid; @@ -53,23 +55,23 @@ export class QQBasicInfoWrapper { //此方法不要直接使用 getQUAInternal() { switch (systemPlatform) { - case 'linux': - return `V1_LNX_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; - case 'darwin': - return `V1_MAC_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; - default: - return `V1_WIN_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; + case 'linux': + return `V1_LNX_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; + case 'darwin': + return `V1_MAC_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; + default: + return `V1_WIN_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; } } getAppidInternal() { switch (systemPlatform) { - case 'linux': - return '537243600'; - case 'darwin': - return '537243441'; - default: - return '537243538'; + case 'linux': + return '537243600'; + case 'darwin': + return '537243441'; + default: + return '537243538'; } } diff --git a/src/core/index.ts b/src/core/index.ts index cf6667b2..6f9791eb 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -46,14 +46,15 @@ export function loadQQWrapper(QQVersion: string): WrapperNodeApi { if (os.platform() === 'darwin') { appPath = path.resolve(path.dirname(process.execPath), '../Resources/app'); } else { - appPath = path.resolve(path.dirname(process.execPath), './resources/app'); + appPath = path.resolve(path.dirname(process.execPath), `./versions/${QQVersion}/`); } let wrapperNodePath = path.resolve(appPath, 'wrapper.node'); if (!fs.existsSync(wrapperNodePath)) { - wrapperNodePath = path.join(appPath, `versions/${QQVersion}/wrapper.node`); + wrapperNodePath = path.join(appPath, `./resources/app./wrapper.node`); } const nativemodule: any = { exports: {} }; process.dlopen(nativemodule, wrapperNodePath); + //\versions\9.9.15-28060\resources\app\wrapper.node return nativemodule.exports; } From 16f7bb48f2bbdec744dabe36e8b2738a2ad4d344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sun, 15 Sep 2024 14:34:47 +0800 Subject: [PATCH 2/8] fix: launcher 28060 --- launcher/NapCatWinBootHook.dll | Bin 11264 -> 18944 bytes launcher/NapCatWinBootMain.exe | Bin 22528 -> 22528 bytes launcher/launcher-win10.bat | 2 +- launcher/launcher.bat | 2 +- launcher/patchNapCat.js | 1 - launcher/qqnt.json | 23 +++++++++++++++++++++++ 6 files changed, 25 insertions(+), 3 deletions(-) delete mode 100644 launcher/patchNapCat.js create mode 100644 launcher/qqnt.json diff --git a/launcher/NapCatWinBootHook.dll b/launcher/NapCatWinBootHook.dll index cd6ff3464883df9f8117133e1dc1c4a1ec8b7c3c..0ad9943f96946c5feeecb44b628a4b276c7ea4cb 100644 GIT binary patch literal 18944 zcmeHv4R}=5wf3H5CJZ5ACdz2=cfg53BQa!B8x4V(B!hcoMgt^36-Z(-fz)IsPR>B^ z+Dqt=UWRk0reE#fz3naHPxXG*Vs9S}_Qwf{NkGtmej3!asr~U_e7sRng0?;1yY@Mg z3;}v?pYOTP_t*2V&)R$Kwbx#I?X}lld!GsZJ9}67}P%Sa%d<6JN9TH33(zeObWTwfzFFTiXZtk58{#dk}Ew(7JUy z0ZUe{S^I*3Pplghux2g6)h&%%i1*BqRC^d}`bq|i?f64;vTlMcw9iSKo6i;kQ>bAV zT?c3t`7Q$i%BL}wAyCth?FE9Ah$o%ZgH&sj1m~8gFrv*{)r|dwa$Ss#QAh2J_0Ys5 zpB~26BfozIV^<_`=Yj1QmrDq$SGpLRNG;E3Qz!*GCE(s$fES5OW7o%loOtYv)fa}F z8l(o;M=nqXD!;K@X68T#O|O+ciQlMvPV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ZLwHny}vEi2`esL zGuRdi-hQ?V_JgrVxJwGdqq!3#B4MdJDEsBMH6e+y8O$$rOM!$e`6qNt!FVLcSX(q$ z*%hx`9}HIpVsa(TB-~jUno~Ka(wN^l5?Nzsi=88d|JIO$T~fBhAI(eU(4w}ej5#if z;Aal}@4%mk=Z!>eOGFnZ!T~uL2{(o17*@(`L65NwmWSaUE|+&L%ftGTwKsJKq$r7_ zibN0@d(^T_lE1XOhW5&$L@b7g(Uzg@vft8zr3r>nie^~s@!aOPK}2GUQKiCHA2t^S zI%@uQLW*thNwJPdtg9^?z$`FJ4DR~8_2zbVO%}IhElS>YFj-+PJXy9OE=yf42vB33 z%3#9S=G2eb;{jxxsT&}giBz=VN!13qcs1P2X#Kj29NCuq7**EIvS zqphyh;e7_5;Nu2P@ErsHEnoz75BV7d%t!q*7dXMI(1=fPxq+_*+=;)NqTmxeiPi(0 zAbwL2_*H;MQM26xK7LAk}w-6Qo+~55NhQ zp|wEws~?l7`O7fmL|N2xV4ytu93LNc@oR)$uir_B|D30OL3dZku}+G`k?y}`M_k5b-WI|&*HFGeikC0=mbI|HEgqM;)`T`VU?3cCC{M(~ z^W%ZFQde8NvMU&fMdFbTxiS#xn%@@hs#-Uv+=0X%?7-c>B6~ELayaVcSRyVrqc||E z&G-syt{FlPnsHpgv7o%cpuverf0w{0QoAn}T!$N=Q;MJM%PHkmDWiiM~L1H zH&LhY}a|HmWn E--IJ}WB>pF diff --git a/launcher/NapCatWinBootMain.exe b/launcher/NapCatWinBootMain.exe index 9cd3132b9ee6c6145708042001196c6538557fd2..5d054fbd86a195c88213c27eb279b5e6119a859c 100644 GIT binary patch delta 27 fcmZqJz}T>XaRUb<^LPJeo4FZp>Vp~24J6e8nwASo delta 27 fcmZqJz}T>XaRUb Date: Sun, 15 Sep 2024 16:18:43 +0800 Subject: [PATCH 3/8] feat: skip Qrcode When Login --- src/shell/napcat.ts | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/shell/napcat.ts b/src/shell/napcat.ts index bef7f21b..e28c75dc 100644 --- a/src/shell/napcat.ts +++ b/src/shell/napcat.ts @@ -103,18 +103,21 @@ export async function NCoreInitShell() { const selfInfo = await new Promise((resolve) => { const loginListener = new NodeIKernelLoginListener(); - + let isLogined = false; // from constructor loginListener.onUserLoggedIn = (userid: string) => { logger.logError(`当前账号(${userid})已登录,无法重复登录`); }; - loginListener.onQRCodeLoginSucceed = async (loginResult) => resolve({ - uid: loginResult.uid, - uin: loginResult.uin, - nick: '', // 获取不到 - online: true, - }); + loginListener.onQRCodeLoginSucceed = async (loginResult) => { + isLogined = true; + resolve({ + uid: loginResult.uid, + uin: loginResult.uin, + nick: '', // 获取不到 + online: true, + }); + } loginListener.onQRCodeGetPicture = ({ pngBase64QrcodeData, qrcodeUrl }) => { //设置WebuiQrcode @@ -142,7 +145,7 @@ export async function NCoreInitShell() { if (errType == 1 && errCode == 3) { // 二维码过期刷新 } - loginService.getQRCodePicture(); + if (!isLogined) loginService.getQRCodePicture(); }; loginListener.onLoginFailed = (args) => { //logger.logError('登录失败(onLoginFailed)', args); @@ -189,14 +192,14 @@ export async function NCoreInitShell() { .then(result => { if (result.loginErrorInfo.errMsg) { logger.logError('快速登录错误:', result.loginErrorInfo.errMsg); - loginService.getQRCodePicture(); + if (!isLogined) loginService.getQRCodePicture(); } }) .catch(); }, 1000); } else { logger.logError('快速登录失败,未找到该 QQ 历史登录记录,将使用二维码登录方式'); - loginService.getQRCodePicture(); + if (!isLogined) loginService.getQRCodePicture(); } } else { logger.log('没有 -q 指令指定快速登录,将使用二维码登录方式'); @@ -204,7 +207,7 @@ export async function NCoreInitShell() { logger.log(`可用于快速登录的 QQ:\n${historyLoginList .map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`) .join('\n') - }`); + }`); } loginService.getQRCodePicture(); } From 66656304f991ab2b0c4fe88a178347bc2522a972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sun, 15 Sep 2024 16:24:08 +0800 Subject: [PATCH 4/8] fix --- src/shell/napcat.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/shell/napcat.ts b/src/shell/napcat.ts index e28c75dc..6943110f 100644 --- a/src/shell/napcat.ts +++ b/src/shell/napcat.ts @@ -141,11 +141,13 @@ export async function NCoreInitShell() { }; loginListener.onQRCodeSessionFailed = (errType: number, errCode: number, errMsg: string) => { //logger.logError('登录失败(onQRCodeSessionFailed)', errCode, errMsg); - logger.logError('[Core] [Login] Login Error,ErrCode: ', errCode, ' ErrMsg:', errMsg); - if (errType == 1 && errCode == 3) { - // 二维码过期刷新 + if (!isLogined) { + logger.logError('[Core] [Login] Login Error,ErrCode: ', errCode, ' ErrMsg:', errMsg); + if (errType == 1 && errCode == 3) { + // 二维码过期刷新 + } + loginService.getQRCodePicture(); } - if (!isLogined) loginService.getQRCodePicture(); }; loginListener.onLoginFailed = (args) => { //logger.logError('登录失败(onLoginFailed)', args); From d0f248aaf92a5276d1747f609ee5dcfd9df14d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 16 Sep 2024 18:53:26 +0800 Subject: [PATCH 5/8] fix --- src/common/qq-basic-info.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/common/qq-basic-info.ts b/src/common/qq-basic-info.ts index 857572fc..91570676 100644 --- a/src/common/qq-basic-info.ts +++ b/src/common/qq-basic-info.ts @@ -61,12 +61,6 @@ export class QQBasicInfoWrapper { return `V1_MAC_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; default: return `V1_WIN_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; - case 'linux': - return `V1_LNX_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; - case 'darwin': - return `V1_MAC_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; - default: - return `V1_WIN_${this.getFullQQVesion()}_${this.getQQBuildStr()}_GW_B`; } } From fa07c2c1fb20f495fa5c75e91ad838391e12e2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 16 Sep 2024 19:31:24 +0800 Subject: [PATCH 6/8] update: appid --- src/common/qq-basic-info.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/qq-basic-info.ts b/src/common/qq-basic-info.ts index 91570676..2d5aa328 100644 --- a/src/common/qq-basic-info.ts +++ b/src/common/qq-basic-info.ts @@ -69,9 +69,9 @@ export class QQBasicInfoWrapper { case 'linux': return '537243600'; case 'darwin': - return '537243441'; - default: return '537243538'; + default: + return '537246092'; } } From 0c7bbda936f2fa1f95a6bf3f15a0761706174888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 16 Sep 2024 20:29:04 +0800 Subject: [PATCH 7/8] feat: Linux28060Appid --- src/common/helper.ts | 16 ++++++++-------- src/common/qq-basic-info.ts | 4 ++-- src/core/external/appid.json | 27 ++++----------------------- 3 files changed, 14 insertions(+), 33 deletions(-) diff --git a/src/common/helper.ts b/src/common/helper.ts index 6b281f62..2412f1cd 100644 --- a/src/common/helper.ts +++ b/src/common/helper.ts @@ -163,8 +163,8 @@ export function isEqual(obj1: any, obj2: any) { export function getDefaultQQVersionConfigInfo(): QQVersionConfigType { if (os.platform() === 'linux') { return { - baseVersion: '3.2.12.27254', - curVersion: '3.2.12.27254', + baseVersion: '3.2.12.28060', + curVersion: '3.2.12.28060', prevVersion: '', onErrorVersions: [], buildId: '27254', @@ -172,19 +172,19 @@ export function getDefaultQQVersionConfigInfo(): QQVersionConfigType { } if (os.platform() === 'darwin') { return { - baseVersion: '6.9.53.27597', - curVersion: '6.9.53.27597', + baseVersion: '6.9.53.28060', + curVersion: '6.9.53.28060', prevVersion: '', onErrorVersions: [], - buildId: '27597', + buildId: '28060', }; } return { - baseVersion: '9.9.15-27597', - curVersion: '9.9.15-27597', + baseVersion: '9.9.15-28060', + curVersion: '9.9.15-28060', prevVersion: '', onErrorVersions: [], - buildId: '27597', + buildId: '28060', }; } diff --git a/src/common/qq-basic-info.ts b/src/common/qq-basic-info.ts index 2d5aa328..4209e974 100644 --- a/src/common/qq-basic-info.ts +++ b/src/common/qq-basic-info.ts @@ -67,9 +67,9 @@ export class QQBasicInfoWrapper { getAppidInternal() { switch (systemPlatform) { case 'linux': - return '537243600'; + return '537246140'; case 'darwin': - return '537243538'; + return '537246140'; default: return '537246092'; } diff --git a/src/core/external/appid.json b/src/core/external/appid.json index cdc03108..0c5c764c 100644 --- a/src/core/external/appid.json +++ b/src/core/external/appid.json @@ -1,29 +1,10 @@ { - - "3.2.12-27254":{ - "appid": 537240795, - "qua": "V1_LNX_NQ_3.2.12_27254_GW_B" - }, - "9.9.15-27254":{ - "appid": 537240709, - "qua": "V1_WIN_NQ_9.9.15_27254_GW_B" - }, - - "3.2.12-27597": { - "appid": 537243600, - "qua": "V1_LNX_NQ_3.2.12_27597_GW_B" - }, - "9.9.15-27597": { - "appid": 537243441, - "qua": "V1_WIN_NQ_9.9.15_27597_GW_B" - }, - "6.9.53-27597": { - "appid": 537243538, - "qua": "V1_MAC_NQ_6.9.53_27597_GW_B" - }, - "9.9.15-28060":{ "appid": 537246092, "qua": "V1_WIN_NQ_9.9.15_28060_GW_B" + }, + "3.2.12-28060":{ + "appid": 537246140, + "qua": "V1_LNX_NQ_3.2.12_28060_GW_B" } } From 4885d4db86c4cd359a550e7756b596ae6d63a860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 16 Sep 2024 20:33:27 +0800 Subject: [PATCH 8/8] support: linux28060 --- src/common/helper.ts | 4 +++- src/core/index.ts | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/helper.ts b/src/common/helper.ts index 2412f1cd..11a6222f 100644 --- a/src/common/helper.ts +++ b/src/common/helper.ts @@ -191,8 +191,10 @@ export function getDefaultQQVersionConfigInfo(): QQVersionConfigType { export function getQQPackageInfoPath(exePath: string = '', version: string): string { if (os.platform() === 'darwin') { return path.join(path.dirname(exePath), '..', 'Resources', 'app', 'package.json'); + } else if (os.platform() === 'linux') { + return path.join(path.dirname(exePath), './resources/app/package.json'); } else { - return path.join(path.dirname(exePath), './versions/9.9.15-28060/resources/app/package.json'); + return path.join(path.dirname(exePath), './versions/' + version + '/resources/app/package.json'); } } diff --git a/src/core/index.ts b/src/core/index.ts index 6f9791eb..0a44c32e 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -45,16 +45,17 @@ export function loadQQWrapper(QQVersion: string): WrapperNodeApi { let appPath; if (os.platform() === 'darwin') { appPath = path.resolve(path.dirname(process.execPath), '../Resources/app'); + } else if (os.platform() === 'linux') { + appPath = path.resolve(path.dirname(process.execPath), './resources/app'); } else { appPath = path.resolve(path.dirname(process.execPath), `./versions/${QQVersion}/`); } let wrapperNodePath = path.resolve(appPath, 'wrapper.node'); if (!fs.existsSync(wrapperNodePath)) { - wrapperNodePath = path.join(appPath, `./resources/app./wrapper.node`); + wrapperNodePath = path.join(appPath, `./resources/app/wrapper.node`); } const nativemodule: any = { exports: {} }; process.dlopen(nativemodule, wrapperNodePath); - //\versions\9.9.15-28060\resources\app\wrapper.node return nativemodule.exports; }