canvas和webgl使用随机字符串
This commit is contained in:
parent
81a60e782e
commit
55f8d069f3
|
@ -1,3 +1,4 @@
|
|||
import { randomRange } from './mysApi.js'
|
||||
/**
|
||||
* 整合接口用于查询数据
|
||||
* 方便后续用于解耦
|
||||
|
@ -56,7 +57,7 @@ export default class apiTool {
|
|||
device_id: data.deviceId.toUpperCase(),
|
||||
platform: '5',
|
||||
seed_time: new Date().getTime() + '',
|
||||
ext_fields: '{"userAgent":"Mozilla/5.0 (Linux; Android 11; J9110 Build/55.2.A.4.332; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36 miHoYoBBSOversea/2.55.0","browserScreenSize":"387904","maxTouchPoints":"5","isTouchSupported":"1","browserLanguage":"zh-CN","browserPlat":"Linux aarch64","browserTimeZone":"Asia/Shanghai","webGlRender":"Adreno (TM) 640","webGlVendor":"Qualcomm","numOfPlugins":"0","listOfPlugins":"unknown","screenRatio":"2.625","deviceMemory":"4","hardwareConcurrency":"8","cpuClass":"unknown","ifNotTrack":"unknown","ifAdBlock":"0","hasLiedLanguage":"0","hasLiedResolution":"1","hasLiedOs":"0","hasLiedBrowser":"0","canvas":"cabdb93b92180946a97fda15f2b7308069b48b51ff90808bd303d3f18d06e2be","webDriver":"0","colorDepth":"24","pixelRatio":"2.625","packageName":"unknown","packageVersion":"2.27.0","webgl":"6dc666a7a001b1bbc2403ad4fc095a4f3202215efc85fd39a7c5fc79d3603c79"}',
|
||||
ext_fields: `{"userAgent":"Mozilla/5.0 (Linux; Android 11; J9110 Build/55.2.A.4.332; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36 miHoYoBBSOversea/2.55.0","browserScreenSize":"387904","maxTouchPoints":"5","isTouchSupported":"1","browserLanguage":"zh-CN","browserPlat":"Linux aarch64","browserTimeZone":"Asia/Shanghai","webGlRender":"Adreno (TM) 640","webGlVendor":"Qualcomm","numOfPlugins":"0","listOfPlugins":"unknown","screenRatio":"2.625","deviceMemory":"4","hardwareConcurrency":"8","cpuClass":"unknown","ifNotTrack":"unknown","ifAdBlock":"0","hasLiedLanguage":"0","hasLiedResolution":"1","hasLiedOs":"0","hasLiedBrowser":"0","canvas":"${randomRange()}","webDriver":"0","colorDepth":"24","pixelRatio":"2.625","packageName":"unknown","packageVersion":"2.27.0","webgl":"${randomRange()}"}`,
|
||||
app_name: 'hk4e_global',
|
||||
device_fp: '38d7f2364db95'
|
||||
}
|
||||
|
@ -169,7 +170,7 @@ export default class apiTool {
|
|||
device_id: data.deviceId.toUpperCase(),
|
||||
platform: '5',
|
||||
seed_time: new Date().getTime() + '',
|
||||
ext_fields: '{"userAgent":"Mozilla/5.0 (Linux; Android 11; J9110 Build/55.2.A.4.332; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36 miHoYoBBSOversea/2.55.0","browserScreenSize":"387904","maxTouchPoints":"5","isTouchSupported":"1","browserLanguage":"zh-CN","browserPlat":"Linux aarch64","browserTimeZone":"Asia/Shanghai","webGlRender":"Adreno (TM) 640","webGlVendor":"Qualcomm","numOfPlugins":"0","listOfPlugins":"unknown","screenRatio":"2.625","deviceMemory":"4","hardwareConcurrency":"8","cpuClass":"unknown","ifNotTrack":"unknown","ifAdBlock":"0","hasLiedLanguage":"0","hasLiedResolution":"1","hasLiedOs":"0","hasLiedBrowser":"0","canvas":"cabdb93b92180946a97fda15f2b7308069b48b51ff90808bd303d3f18d06e2be","webDriver":"0","colorDepth":"24","pixelRatio":"2.625","packageName":"unknown","packageVersion":"2.27.0","webgl":"6dc666a7a001b1bbc2403ad4fc095a4f3202215efc85fd39a7c5fc79d3603c79"}',
|
||||
ext_fields: `{"userAgent":"Mozilla/5.0 (Linux; Android 11; J9110 Build/55.2.A.4.332; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36 miHoYoBBSOversea/2.55.0","browserScreenSize":"387904","maxTouchPoints":"5","isTouchSupported":"1","browserLanguage":"zh-CN","browserPlat":"Linux aarch64","browserTimeZone":"Asia/Shanghai","webGlRender":"Adreno (TM) 640","webGlVendor":"Qualcomm","numOfPlugins":"0","listOfPlugins":"unknown","screenRatio":"2.625","deviceMemory":"4","hardwareConcurrency":"8","cpuClass":"unknown","ifNotTrack":"unknown","ifAdBlock":"0","hasLiedLanguage":"0","hasLiedResolution":"1","hasLiedOs":"0","hasLiedBrowser":"0","canvas":"${randomRange()}","webDriver":"0","colorDepth":"24","pixelRatio":"2.625","packageName":"unknown","packageVersion":"2.27.0","webgl":"${randomRange()}"}`,
|
||||
app_name: 'hkrpg_global',
|
||||
device_fp: '38d7f2364db95'
|
||||
}
|
||||
|
|
|
@ -229,4 +229,14 @@ export default class MysApi {
|
|||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
export function randomRange() {
|
||||
let randomStr = ''
|
||||
let charStr = 'abcdef0123456789'
|
||||
for (let i = 0; i < 64; i++) {
|
||||
let index = Math.round(Math.random() * (charStr.length - 1))
|
||||
randomStr += charStr.substring(index, index + 1)
|
||||
}
|
||||
return randomStr
|
||||
}
|
Loading…
Reference in New Issue