mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
fix:设备信息oaid改为随机参数
This commit is contained in:
parent
21e595e6f5
commit
ee6e66543b
7 changed files with 9 additions and 16 deletions
|
|
@ -63,9 +63,13 @@ git clone --depth=1 https://gitee.com/bietiaop/ZZZ-Plugin.git ./plugins/ZZZ-Plug
|
|||
|
||||
如果你需要绕过验证码,请使用第三方插件。或者到交流群里询问他人使用的方法(请务必声明你**已经**阅读过 `README` 内容)。
|
||||
|
||||
## 默认设备
|
||||
|
||||
发送 `%设置默认设备` 可修改本插件自带默认设备参数,或使用锅巴插件进行修改。
|
||||
|
||||
## 绑定设备
|
||||
|
||||
本插件会自带一个设备参数模拟真机进行请求,但是这个设备参数会被所有使用本插件的用户共同使用,因此,米游社**大概率**会认为此设备有问题,是非法请求,因此在遇到米游社抛出对应错误时,需要每个人绑定真实设备参数进行请求(目前本插件自带设备参数的oaid数值已改为随机数尝试避免错误,更新前使用本插件自带设备参数的,更新后**务必删除**device配置文件中的oaid数值,使其留空)。
|
||||
本插件会自带一个默认设备参数模拟真机进行请求,但是这个设备参数会被所有使用本插件的用户共同使用,因此在遇到米游社抛出对应错误时,需要每个人绑定真实设备参数进行请求。
|
||||
|
||||
如果需要绑定设备,请发送 `%绑定设备帮助` 进行查看如何绑定。第一种方法就是抓包,此种方法危害性较小,技术难度相对较高,但是IOS与Android设备通用。
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ export async function toSetDefaultDevice() {
|
|||
!info?.deviceName ||
|
||||
!info?.deviceBoard ||
|
||||
!info?.deviceModel ||
|
||||
!info?.oaid ||
|
||||
!info?.deviceFingerprint ||
|
||||
!info?.deviceProduct
|
||||
) {
|
||||
|
|
@ -44,7 +43,6 @@ export async function toSetDefaultDevice() {
|
|||
productName: info.deviceProduct,
|
||||
productType: info.deviceName,
|
||||
modelName: info.deviceModel,
|
||||
oaid: info.oaid,
|
||||
deviceInfo: info.deviceFingerprint,
|
||||
board: info.deviceBoard,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ export class Panel extends ZZZPlugin {
|
|||
!info?.deviceName ||
|
||||
!info?.deviceBoard ||
|
||||
!info?.deviceModel ||
|
||||
!info?.oaid ||
|
||||
!info?.deviceFingerprint ||
|
||||
!info?.deviceProduct
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,5 @@
|
|||
productName: J9110
|
||||
productType: J9110
|
||||
modelName: J9110
|
||||
oaid:
|
||||
deviceInfo: Sony/J9110/J9110:11/55.2.A.4.332/055002A004033203408384484:user/release-keys
|
||||
board: msmnile
|
||||
|
|
@ -259,15 +259,6 @@ export function supportGuoba() {
|
|||
placeholder: '请输入modelName',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'device.oaid',
|
||||
label: 'oaid',
|
||||
bottomHelpMessage: '设置默认设备oaid字段',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入oaid',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'device.deviceInfo',
|
||||
label: 'deviceInfo(deviceFingerprint)',
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ export default class ZZZApiTool {
|
|||
productName = deviceCfg.productName ? _.get(deviceCfg, 'productName') : _.get(defDeviceCfg, 'productName'),
|
||||
deviceType = deviceCfg.productType ? _.get(deviceCfg, 'productType') : _.get(defDeviceCfg, 'productType'),
|
||||
modelName = deviceCfg.modelName ? _.get(deviceCfg, 'modelName') : _.get(defDeviceCfg, 'modelName'),
|
||||
oaid = deviceCfg.oaid ? _.get(deviceCfg, 'oaid') : this.uuid,
|
||||
oaid = this.uuid,
|
||||
deviceInfo = deviceCfg.deviceInfo ? _.get(deviceCfg, 'deviceInfo') : _.get(defDeviceCfg, 'deviceInfo'),
|
||||
board = deviceCfg.board ? _.get(deviceCfg, 'board') : _.get(defDeviceCfg, 'board'),
|
||||
} = data;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import request from '../utils/request.js';
|
|||
import path from 'path';
|
||||
import { pluginName, resourcesPath } from './path.js';
|
||||
import version from './version.js';
|
||||
import crypto from 'crypto';
|
||||
export class ZZZPlugin extends plugin {
|
||||
/**
|
||||
* 获取用户 UID(如果需要同时获取API,可以直接调用 getAPI)
|
||||
|
|
@ -65,6 +66,7 @@ export class ZZZPlugin extends plugin {
|
|||
*/
|
||||
async getAPI() {
|
||||
this.e.game = 'zzz';
|
||||
this.uuid = crypto.randomUUID();
|
||||
// 直接调用获取 UID
|
||||
const uid = await this.getUID();
|
||||
// 获取用户的 cookie
|
||||
|
|
@ -102,7 +104,7 @@ export class ZZZPlugin extends plugin {
|
|||
productName: bindInfo?.deviceProduct,
|
||||
deviceType: bindInfo?.deviceName,
|
||||
modelName: bindInfo?.deviceModel,
|
||||
oaid: bindInfo?.oaid,
|
||||
oaid: this.uuid,
|
||||
deviceInfo: bindInfo?.deviceFingerprint,
|
||||
board: bindInfo?.deviceBoard,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue