feat(spoofer): even more spoof options

didn't do the translations cuz lazy i'll do it later
I'll add even more options later aswell
This commit is contained in:
authorisation 2023-09-03 18:40:52 +02:00
parent 080aaf9338
commit 0fed75b9ff
3 changed files with 25 additions and 0 deletions

View File

@ -17,6 +17,8 @@ class Spoof : ConfigContainer() {
val debugFlag = boolean("debug_flag") val debugFlag = boolean("debug_flag")
val mockLocationState = boolean("mock_location") val mockLocationState = boolean("mock_location")
val splitClassLoader = string("split_classloader") val splitClassLoader = string("split_classloader")
val isLowEndDevice = string("low_end_device")
val getDataDirectory = string("get_data_directory")
} }
val device = container("device", Device()) { addNotices(FeatureNotice.BAN_RISK) } val device = container("device", Device()) { addNotices(FeatureNotice.BAN_RISK) }
} }

View File

@ -17,6 +17,8 @@ class SnapClassCache (
val conversation by lazy { findClass("com.snapchat.client.messaging.Conversation") } val conversation by lazy { findClass("com.snapchat.client.messaging.Conversation") }
val feedManager by lazy { findClass("com.snapchat.client.messaging.FeedManager\$CppProxy") } val feedManager by lazy { findClass("com.snapchat.client.messaging.FeedManager\$CppProxy") }
val chromiumJNIUtils by lazy { findClass("org.chromium.base.JNIUtils")} val chromiumJNIUtils by lazy { findClass("org.chromium.base.JNIUtils")}
val chromiumBuildInfo by lazy { findClass("org.chromium.base.BuildInfo")}
val chromiumPathUtils by lazy { findClass("org.chromium.base.PathUtils")}
private fun findClass(className: String): Class<*> { private fun findClass(className: String): Class<*> {
return try { return try {

View File

@ -15,12 +15,15 @@ class DeviceSpooferHook: Feature("device_spoofer", loadParams = FeatureLoadParam
val debugFlag by context.config.experimental.spoof.device.debugFlag val debugFlag by context.config.experimental.spoof.device.debugFlag
val mockLocationState by context.config.experimental.spoof.device.mockLocationState val mockLocationState by context.config.experimental.spoof.device.mockLocationState
val splitClassLoader by context.config.experimental.spoof.device.splitClassLoader val splitClassLoader by context.config.experimental.spoof.device.splitClassLoader
val isLowEndDevice by context.config.experimental.spoof.device.isLowEndDevice
val getDataDirectory by context.config.experimental.spoof.device.getDataDirectory
val settingsSecureClass = android.provider.Settings.Secure::class.java val settingsSecureClass = android.provider.Settings.Secure::class.java
val fingerprintClass = android.os.Build::class.java val fingerprintClass = android.os.Build::class.java
val packageManagerClass = android.content.pm.PackageManager::class.java val packageManagerClass = android.content.pm.PackageManager::class.java
val applicationInfoClass = android.content.pm.ApplicationInfo::class.java val applicationInfoClass = android.content.pm.ApplicationInfo::class.java
//FINGERPRINT
if (fingerprint.isNotEmpty()) { if (fingerprint.isNotEmpty()) {
Hooker.hook(fingerprintClass, "FINGERPRINT", HookStage.BEFORE) { hookAdapter -> Hooker.hook(fingerprintClass, "FINGERPRINT", HookStage.BEFORE) { hookAdapter ->
hookAdapter.setResult(fingerprint) hookAdapter.setResult(fingerprint)
@ -32,6 +35,7 @@ class DeviceSpooferHook: Feature("device_spoofer", loadParams = FeatureLoadParam
} }
} }
//ANDROID ID
if (androidId.isNotEmpty()) { if (androidId.isNotEmpty()) {
Hooker.hook(settingsSecureClass, "getString", HookStage.BEFORE) { hookAdapter -> Hooker.hook(settingsSecureClass, "getString", HookStage.BEFORE) { hookAdapter ->
if(hookAdapter.args()[1] == "android_id") { if(hookAdapter.args()[1] == "android_id") {
@ -68,5 +72,22 @@ class DeviceSpooferHook: Feature("device_spoofer", loadParams = FeatureLoadParam
hookAdapter.setResult(splitClassLoader) hookAdapter.setResult(splitClassLoader)
} }
} }
//ISLOWENDDEVICE
if(isLowEndDevice.isNotEmpty()) {
Hooker.hook(context.classCache.chromiumBuildInfo, "getAll", HookStage.BEFORE) { hookAdapter ->
hookAdapter.setResult(isLowEndDevice)
}
}
//GETDATADIRECTORY
if(getDataDirectory.isNotEmpty()) {
Hooker.hook(context.classCache.chromiumPathUtils, "getDataDirectory", HookStage.BEFORE) {hookAdapter ->
hookAdapter.setResult(getDataDirectory)
}
}
//accessibility_enabled
} }
} }