Files
damai-wx/hook.js
MagicalKudzu f67fb8b6b3 更新
2025-12-17 14:19:22 +08:00

325 lines
9.6 KiB
JavaScript

function setup() {
hook()
}
function hook() {
wx.version = {
updateTime: '2025.12.12 10:34:08',
version: '3.12.1',
}
wx.getRendererUserAgent = function () {
return new Promise((resolve) => {
resolve(
'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.66(0x1800422e) NetType/WIFI Language/zh_CN',
)
})
}
wx.getBatteryInfo = function () {
return new Promise((resolve) => {
resolve({ errMsg: 'getBatteryInfo:ok', isCharging: true, level: 100, isLowPowerModeEnabled: false })
})
}
wx.getSystemInfo = function () {
return new Promise((resolve) => {
resolve({
errMsg: 'getSystemInfo:ok',
safeArea: { bottom: 810, height: 763, top: 47, width: 390, left: 0, right: 390 },
fontSizeSetting: 16,
notificationAuthorized: true,
locationEnabled: true,
batteryLevel: 100,
bluetoothEnabled: true,
fontSizeScaleFactor: 0.9411764705882353,
version: '8.0.66',
screenWidth: 390,
system: 'iOS 18.7.1',
pixelRatio: 3,
locationAuthorized: true,
model: 'iPhone 13<iPhone14,5>',
windowHeight: 753,
phoneCalendarAuthorized: false,
microphoneEnabled: true,
wifiEnabled: true,
bluetoothAuthorized: true,
locationReducedAccuracy: false,
memorySize: 3665,
screenHeight: 844,
statusBarHeight: 47,
windowWidth: 390,
translateLanguage: 'zh_CN',
albumAuthorized: true,
notificationAlertAuthorized: true,
benchmarkLevel: 39,
notificationBadgeAuthorized: true,
language: 'zh_CN',
screenTop: 91,
notificationSoundAuthorized: true,
microphoneAuthorized: true,
cameraAuthorized: true,
deviceOrientation: 'portrait',
brand: 'iPhone',
platform: 'ios',
SDKVersion: '3.12.1',
enableDebug: true,
host: { env: 'WeChat', appId: 'wx938b41d0d7e8def0', version: 402670126 },
mode: 'default',
appName: 'weixin',
devicePixelRatio: 3,
})
})
}
wx.getSystemInfoSync = function () {
return {
safeArea: { bottom: 810, height: 763, top: 47, width: 390, left: 0, right: 390 },
fontSizeSetting: 16,
notificationAuthorized: true,
locationEnabled: true,
batteryLevel: 100,
bluetoothEnabled: true,
fontSizeScaleFactor: 0.9411764705882353,
version: '8.0.66',
screenWidth: 390,
system: 'iOS 18.7.1',
pixelRatio: 3,
locationAuthorized: true,
model: 'iPhone 13<iPhone14,5>',
windowHeight: 753,
phoneCalendarAuthorized: false,
microphoneEnabled: true,
wifiEnabled: true,
bluetoothAuthorized: true,
locationReducedAccuracy: false,
memorySize: 3665,
screenHeight: 844,
statusBarHeight: 47,
windowWidth: 390,
translateLanguage: 'zh_CN',
albumAuthorized: true,
notificationAlertAuthorized: true,
benchmarkLevel: 39,
notificationBadgeAuthorized: true,
language: 'zh_CN',
screenTop: 91,
notificationSoundAuthorized: true,
microphoneAuthorized: true,
cameraAuthorized: true,
deviceOrientation: 'portrait',
brand: 'iPhone',
platform: 'ios',
SDKVersion: '3.12.1',
enableDebug: true,
host: { env: 'WeChat', appId: 'wx938b41d0d7e8def0', version: 402670126 },
mode: 'default',
appName: 'weixin',
devicePixelRatio: 3,
}
}
wx.getDeviceInfo = function () {
return {
memorySize: 3665,
system: 'iOS 18.7.1',
model: 'iPhone 13<iPhone14,5>',
benchmarkLevel: 39,
brand: 'iPhone',
platform: 'ios',
}
}
wx.getWindowInfo = function () {
return {
screenTop: 91,
pixelRatio: 3,
safeArea: { bottom: 810, height: 763, top: 47, width: 390, left: 0, right: 390 },
screenWidth: 390,
screenHeight: 844,
windowWidth: 390,
windowHeight: 753,
statusBarHeight: 47,
}
}
wx.getAppBaseInfo = function () {
return {
fontSizeSetting: 16,
language: 'zh_CN',
fontSizeScaleFactor: 0.9411764705882353,
translateLanguage: 'zh_CN',
version: '8.0.66',
SDKVersion: '3.12.1',
enableDebug: true,
host: { env: 'WeChat', appId: 'wx938b41d0d7e8def0', version: 402670126 },
mode: 'default',
appName: 'weixin',
}
}
wx.getAccountInfoSync = function () {
return { miniProgram: { appId: 'wx938b41d0d7e8def0', envVersion: 'release', version: '5.2.23' } }
}
}
function hook1() {
wx.version = { updateTime: '2025.12.12 10:34:08', version: '3.12.1' }
wx.getRendererUserAgent = function () {
return new Promise((resolve) => {
resolve(
'Mozilla/5.0 (iPad; CPU OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.66(0x1800422b) NetType/WIFI Language/zh_CN MiniProgramEnv/iOS',
)
})
}
wx.getBatteryInfo = function () {
return new Promise((resolve) => {
resolve({ errMsg: 'getBatteryInfo:ok', isCharging: true, level: 100, isLowPowerModeEnabled: false })
})
}
wx.getSystemInfo = function () {
return new Promise((resolve) => {
resolve({
errMsg: 'getSystemInfo:ok',
safeArea: { bottom: 1080, height: 1060, top: 20, width: 810, left: 0, right: 810 },
fontSizeSetting: 16,
notificationAuthorized: true,
locationEnabled: true,
batteryLevel: 100,
bluetoothEnabled: true,
fontSizeScaleFactor: 0.9411764705882353,
version: '8.0.66',
screenWidth: 810,
system: 'iOS 18.5',
pixelRatio: 2,
locationAuthorized: true,
model: 'iPad (9th generation) Wi-Fi',
windowHeight: 1003.3333333333334,
phoneCalendarAuthorized: false,
microphoneEnabled: true,
wifiEnabled: true,
bluetoothAuthorized: true,
locationReducedAccuracy: false,
memorySize: 2940,
screenHeight: 1080,
statusBarHeight: 20,
windowWidth: 810,
translateLanguage: 'zh_CN',
albumAuthorized: true,
notificationAlertAuthorized: true,
benchmarkLevel: -1,
notificationBadgeAuthorized: true,
language: 'zh_CN',
screenTop: 76.66666666666669,
notificationSoundAuthorized: true,
microphoneAuthorized: true,
cameraAuthorized: true,
deviceOrientation: 'portrait',
brand: 'iPhone',
platform: 'ios',
SDKVersion: '3.12.1',
enableDebug: true,
host: { env: 'WeChat', appId: 'wx938b41d0d7e8def0', version: 402670123 },
mode: 'default',
appName: 'weixin',
devicePixelRatio: 2,
})
})
}
wx.getSystemInfoSync = function () {
return {
safeArea: { bottom: 1080, height: 1060, top: 20, width: 810, left: 0, right: 810 },
fontSizeSetting: 16,
notificationAuthorized: true,
locationEnabled: true,
batteryLevel: 85,
bluetoothEnabled: true,
fontSizeScaleFactor: 0.9411764705882353,
version: '8.0.66',
screenWidth: 810,
system: 'iOS 18.5',
pixelRatio: 2,
locationAuthorized: true,
model: 'iPad (9th generation) Wi-Fi',
windowHeight: 1003.3333333333334,
phoneCalendarAuthorized: false,
microphoneEnabled: true,
wifiEnabled: true,
bluetoothAuthorized: true,
locationReducedAccuracy: false,
memorySize: 2940,
screenHeight: 1080,
statusBarHeight: 20,
windowWidth: 810,
translateLanguage: 'zh_CN',
albumAuthorized: true,
notificationAlertAuthorized: true,
benchmarkLevel: -1,
notificationBadgeAuthorized: true,
language: 'zh_CN',
screenTop: 76.66666666666669,
notificationSoundAuthorized: true,
microphoneAuthorized: true,
cameraAuthorized: true,
deviceOrientation: 'portrait',
brand: 'iPhone',
platform: 'ios',
SDKVersion: '3.12.1',
enableDebug: true,
host: { env: 'WeChat', appId: 'wx938b41d0d7e8def0', version: 402670123 },
mode: 'default',
appName: 'weixin',
devicePixelRatio: 2,
}
}
wx.getDeviceInfo = function () {
return {
memorySize: 2940,
system: 'iOS 18.5',
model: 'iPad (9th generation) Wi-Fi',
benchmarkLevel: -1,
brand: 'iPhone',
platform: 'ios',
}
}
wx.getWindowInfo = function () {
return {
screenTop: 76.66666666666669,
pixelRatio: 2,
safeArea: { bottom: 1080, height: 1060, top: 20, width: 810, left: 0, right: 810 },
screenWidth: 810,
screenHeight: 1080,
windowWidth: 810,
windowHeight: 1003.3333333333334,
statusBarHeight: 20,
}
}
wx.getAppBaseInfo = function () {
return {
fontSizeSetting: 16,
language: 'zh_CN',
fontSizeScaleFactor: 0.9411764705882353,
translateLanguage: 'zh_CN',
version: '8.0.66',
SDKVersion: '3.12.1',
enableDebug: true,
host: { env: 'WeChat', appId: 'wx938b41d0d7e8def0', version: 402670123 },
mode: 'default',
appName: 'weixin',
}
}
wx.getAccountInfoSync = function () {
return { miniProgram: { appId: 'wx938b41d0d7e8def0', envVersion: 'release', version: '5.2.23' } }
}
}
setup()