-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a script to disable iOS jailbreak detection (WIP)
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/************************************************************************************************** | ||
* | ||
* Some iOS apps attempt to detect jailbroken devices and similar. This script disables these | ||
* detections to ensure you can freely manage your device and modify your apps. | ||
* | ||
* Source available at https://github.com/httptoolkit/frida-interception-and-unpinning/ | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
* SPDX-FileCopyrightText: Tim Perry <tim@httptoolkit.com> | ||
* | ||
*************************************************************************************************/ | ||
|
||
if (ObjC.available) { | ||
try { | ||
const JailMonkey = ObjC.classes.JailMonkey; | ||
if (JailMonkey) { | ||
const isJailBroken = JailMonkey["- isJailBroken"]; | ||
Interceptor.attach(isJailBroken.implementation, { | ||
onLeave: function(retval) { | ||
if (DEBUG_MODE) console.log("JailMonkey isJailBroken check hooked & skipped"); | ||
retval.replace(ptr("0x0")); | ||
} | ||
}); | ||
|
||
console.log('== Hooked JailMonkey detection =='); | ||
} else { | ||
if (DEBUG_MODE) console.log('Skipping JailMonkey hook - not present'); | ||
} | ||
} catch (err) { | ||
console.error(`[!] ERROR: JailMonkey isJailBroken hook failed: ${err}`); | ||
} | ||
} |