确保devices.js 具有相关的协议版本(这里以9.0.56为例)
[/*略...*/
exports.Device = Device;
/**
* 支持的登录设备平台
* * `aPad`和`Watch`协议无法设置在线状态、无法接收某些群事件(包括戳一戳等)
* * 目前仅`Watch`支持扫码登录,可能会支持`iPad`扫码登录
*/
var Platform;
(function (Platform) {
/** 安卓手机 */
Platform[Platform["Android"] = 1] = "Android";
/** 安卓平板 */
Platform[Platform["aPad"] = 2] = "aPad";
/** 安卓手表 */
Platform[Platform["Watch"] = 3] = "Watch";
/** MacOS */
Platform[Platform["iMac"] = 4] = "iMac";
/** iPad */
Platform[Platform["iPad"] = 5] = "iPad";
/** Tim */
Platform[Platform["Tim"] = 6] = "Tim";
})(Platform || (exports.Platform = Platform = {}));
const mobile = [
// 每个版本不同的信息
{
name: "A9.0.56.6a4a36ca",
version: "9.0.56.16830",
ver: "9.0.56",
buildtime: 1713424357,
subid: 537220362,
apad_subid: 537220362,
bitmap: 150470524,
sdkver: "6.0.0.2558",
qua: 'V1_AND_SQ_9.0.56_6372_YYB_D',
ssover: 21,
},
{
name: "A9.0.17.6a4a36ca",
version: "9.0.17.15185",
ver: "9.0.17",
buildtime: 1702888273,
subid: 537204056,
apad_subid: 537204095,
bitmap: 150470524,
sdkver: "6.0.0.2558",
qua: 'V1_AND_SQ_9.0.17_5712_YYB_D',
ssover: 21,
},
{
name: "A9.0.15.4145f774",
version: "9.0.15.14970",
ver: "9.0.15",
buildtime: 1702888273,
subid: 537202216,
apad_subid: 537202255,
bitmap: 150470524,
sdkver: "6.0.0.2558",
qua: 'V1_AND_SQ_9.0.15_5626_YYB_D',
ssover: 21,
},
{
name: "A9.0.8.10368491",
version: "9.0.8.14755",
ver: "9.0.8",
buildtime: 1702888273,
subid: 537200218,
apad_subid: 537200257,
bitmap: 150470524,
sdkver: "6.0.0.2558",
qua: 'V1_AND_SQ_9.0.8_5540_YYB_D',
ssover: 21,
},
{
name: "A9.0.0.0ebb1ecb",
version: "9.0.0.14110",
ver: "9.0.0",
buildtime: 1701164403,
subid: 537194351,
apad_subid: 537194390,
bitmap: 150470524,
sdkver: "6.0.0.2557",
qua: 'V1_AND_SQ_9.0.0_5282_YYB_D',
ssover: 21,
},
{
name: "A8.9.93.bf80f08f",
version: "8.9.93.13475",
ver: "8.9.93",
buildtime: 1697015435,
subid: 537187398,
apad_subid: 537187437,
bitmap: 150470524,
sdkver: "6.0.0.2556",
qua: 'V1_AND_SQ_8.9.93_5028_YYB_D',
ssover: 21,
},
{
name: "A8.9.90.cccfa0d0",
version: "8.9.90.13250",
ver: "8.9.90",
buildtime: 1697015435,
subid: 537185007,
apad_subid: 537185046,
bitmap: 150470524,
sdkver: "6.0.0.2556",
qua: 'V1_AND_SQ_8.9.90_4938_YYB_D',
ssover: 21,
},
{
name: "A8.9.88.46a07457",
version: "8.9.88.13035",
ver: "8.9.88",
buildtime: 1697015435,
subid: 537182769,
apad_subid: 537182808,
bitmap: 150470524,
sdkver: "6.0.0.2556",
qua: 'V1_AND_SQ_8.9.88_4852_YYB_D',
ssover: 21,
},
{
name: "A8.9.85.3377f9bf",
version: "8.9.85.12820",
ver: "8.9.85",
buildtime: 1697015435,
subid: 537180568,
apad_subid: 537180607,
bitmap: 150470524,
sdkver: "6.0.0.2556",
qua: 'V1_AND_SQ_8.9.85_4766_YYB_D',
ssover: 21,
},
{
name: "A8.9.83.c9a61e5e",
version: "8.9.83.12605",
ver: "8.9.83",
buildtime: 1691565978,
subid: 537178646,
apad_subid: 537178685,
bitmap: 150470524,
sdkver: "6.0.0.2554",
qua: 'V1_AND_SQ_8.9.83_4680_YYB_D',
ssover: 20,
},
{
name: "A8.9.80.57a42f50",
version: "8.9.80.12440",
ver: "8.9.80",
buildtime: 1691565978,
subid: 537176863,
apad_subid: 537176902,
bitmap: 150470524,
sdkver: "6.0.0.2554",
qua: 'V1_AND_SQ_8.9.80_4614_YYB_D',
ssover: 20,
},
{
name: "A8.9.78.d5d9d71d",
version: "8.9.78.12275",
ver: "8.9.78",
buildtime: 1691565978,
subid: 537175315,
apad_subid: 537175354,
bitmap: 150470524,
sdkver: "6.0.0.2554",
qua: 'V1_AND_SQ_8.9.78_4548_YYB_D',
ssover: 20,
},
{
name: "A8.9.76.c71a1fa8",
version: "8.9.76.12115",
ver: "8.9.76",
buildtime: 1691565978,
subid: 537173477,
apad_subid: 537173525,
bitmap: 150470524,
sdkver: "6.0.0.2554",
qua: 'V1_AND_SQ_8.9.76_4484_YYB_D',
ssover: 20,
},
{
name: "A8.9.75.354d41fc",
version: "8.9.75.12110",
ver: "8.9.75",
buildtime: 1691565978,
subid: 537173381,
apad_subid: 537173429,
bitmap: 150470524,
sdkver: "6.0.0.2554",
qua: 'V1_AND_SQ_8.9.75_4482_YYB_D',
ssover: 20,
},
{
name: "A8.9.73.11945",
version: "8.9.73.11945",
ver: "8.9.73",
buildtime: 1690371091,
subid: 537171689,
apad_subid: 537171737,
bitmap: 150470524,
sdkver: "6.0.0.2553",
qua: 'V1_AND_SQ_8.9.73_4416_YYB_D',
ssover: 20,
},
{
name: "A8.9.71.9fd08ae5",
version: "8.9.71.11735",
ver: "8.9.71",
buildtime: 1688720082,
subid: 537170024,
apad_subid: 537170072,
bitmap: 150470524,
sdkver: "6.0.0.2551",
qua: 'V1_AND_SQ_8.9.71_4332_YYB_D',
ssover: 20,
},
{
name: "A8.9.70.b4332bd3",
version: "8.9.70.11730",
ver: "8.9.70",
buildtime: 1688720082,
subid: 537169928,
apad_subid: 537169976,
bitmap: 150470524,
sdkver: "6.0.0.2551",
qua: 'V1_AND_SQ_8.9.70_4330_YYB_D',
ssover: 20,
},
{
name: "A8.9.68.e757227e",
version: "8.9.68.11565",
ver: "8.9.68",
buildtime: 1687254022,
subid: 537168313,
apad_subid: 537168361,
bitmap: 150470524,
sdkver: "6.0.0.2549",
qua: 'V1_AND_SQ_8.9.68_4264_YYB_D',
ssover: 20,
},
{
name: "A8.9.63.5156de84",
version: "8.9.63.11390",
ver: "8.9.63",
buildtime: 1685069178,
subid: 537164840,
apad_subid: 537164888,
bitmap: 150470524,
sdkver: "6.0.0.2546",
qua: 'V1_AND_SQ_8.9.63_4194_YYB_D',
ssover: 20,
}
].map((shortInfo) => {
// 固定信息
return {
id: "com.tencent.mobileqq",
appid: 16,
app_key: '0S200MNJT807V3GE',
sign: Buffer.from('A6 B7 45 BF 24 A2 C2 77 52 77 16 F6 F3 6E B6 8D'.split(' ').map(s => parseInt(s, 16))),
main_sig_map: 16724722,
sub_sig_map: 66560,
display: "Android",
device_type: 3,
...shortInfo
};
});
const tim = [
// 每个版本不同的信息
{
name: "A3.5.6.b80635c4",
version: "3.5.6.3208",
ver: "3.5.6",
buildtime: 1630062176,
subid: 537181169,
bitmap: 150470524,
sdkver: "6.0.0.2484",
qua: "V1_AND_SQ_8.3.9_356_TIM_D",
ssover: 18,
},
{
name: "A3.5.5.fa2ef27c",
version: "3.5.5.3198",
ver: "3.5.5",
buildtime: 1630062176,
subid: 537177451,
bitmap: 150470524,
sdkver: "6.0.0.2484",
qua: "V1_AND_SQ_8.3.9_355_TIM_D",
ssover: 18,
},
{
name: "A3.5.2.3f4af297",
version: "3.5.2.3178",
ver: "3.5.2",
buildtime: 1630062176,
subid: 537162286,
bitmap: 150470524,
sdkver: "6.0.0.2484",
qua: "V1_AND_SQ_8.3.9_352_TIM_D",
ssover: 18,
},
{
name: "A3.5.1.db08e878",
version: "3.5.1.3168",
ver: "3.5.1",
buildtime: 1630062176,
subid: 537150355,
bitmap: 150470524,
sdkver: "6.0.0.2484",
qua: "V1_AND_SQ_8.3.9_351_TIM_D",
ssover: 18,
}
].map((shortInfo) => {
// 固定信息
return {
id: "com.tencent.tim",
app_key: '0S200MNJT807V3GE',
sign: Buffer.from('775e696d09856872fdd8ab4f3f06b1e0', 'hex'),
appid: 16,
main_sig_map: 16724722,
sub_sig_map: 0x10400,
display: "Tim",
device_type: -1,
...shortInfo
};
});
const watch = [
{
name: "A2.0.8",
version: "2.0.8",
ver: "2.0.8",
buildtime: 1559564731,
subid: 537065138,
bitmap: 16252796,
sdkver: "6.0.0.2365",
qua: '',
ssover: 5
},
{
name: "A2.1.7",
version: "2.1.7",
ver: "2.1.7",
buildtime: 1654570540,
subid: 537140974,
bitmap: 16252796,
sdkver: "6.0.0.2366",
qua: 'V1_WAT_SQ_2.1.7_002_IDC_B',
ssover: 5
}
].map((shortInfo) => {
// 固定信息
return {
id: "com.tencent.qqlite",
app_key: '0S200MNJT807V3GE',
sign: Buffer.from('A6 B7 45 BF 24 A2 C2 77 52 77 16 F6 F3 6E B6 8D'.split(' ').map(s => parseInt(s, 16))),
appid: 16,
main_sig_map: 16724722,
sub_sig_map: 0x10400,
display: "Watch",
device_type: 8,
...shortInfo
};
});
const hd = {
id: "com.tencent.qq",
app_key: '0S200MNJT807V3GE',
name: "A6.8.2.21241",
version: "6.8.2.21241",
ver: "6.8.2",
sign: Buffer.from('AA 39 78 F4 1F D9 6F F9 91 4A 66 9E 18 64 74 C7'.split(' ').map(s => parseInt(s, 16))),
buildtime: 1647227495,
appid: 16,
subid: 537128930,
bitmap: 150470524,
main_sig_map: 1970400,
sub_sig_map: 66560,
sdkver: "6.2.0.1023",
display: "iMac",
device_type: 5,
qua: '',
ssover: 12
};
const apklist = {
[Platform.Android]: mobile,
[Platform.Tim]: tim,
[Platform.aPad]: mobile.map(apk => {
return {
...apk,
subid: apk?.apad_subid || apk.subid,
display: 'aPad'
};
}),
[Platform.Watch]: watch,
[Platform.iMac]: { ...hd },
[Platform.iPad]: {
...mobile[0],
subid: 537155074,
sign: hd.sign,
name: '8.9.50.611',
version: '8.9.50.611',
ver: '8.9.50',
sdkver: '6.0.0.2535',
qua: '',
display: 'iPad',
ssover: 19
},
};
function getApkInfoList(p) {
const apks = apklist[p];
if (!Array.isArray(apks))
return [apks];
return apks;
}
exports.getApkInfoList = getApkInfoList;](https://)