Skip to content

Commit 48ee3be

Browse files
authored
Add files via upload
1 parent 6d1854f commit 48ee3be

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

root_detection_bypass.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Java.perform(function () {
2+
console.log('[+] Starting Root Detection and SSL Pinning Bypass');
3+
4+
// Root Detection Bypass
5+
try {
6+
var RootPackages = [
7+
'com.noshufou.android.su',
8+
'eu.chainfire.supersu',
9+
'com.koushikdutta.superuser',
10+
'com.zachspong.temprootremovejb',
11+
'com.ramdroid.appquarantine',
12+
'com.topjohnwu.magisk'
13+
];
14+
15+
var PackageManager = Java.use('android.app.ApplicationPackageManager');
16+
PackageManager.getPackageInfo.implementation = function (pkg, flags) {
17+
if (RootPackages.indexOf(pkg) >= 0) {
18+
console.log('[+] Bypassing root detection for package: ' + pkg);
19+
throw new Error('Package not found'); // Simulate package not found
20+
}
21+
return this.getPackageInfo(pkg, flags);
22+
};
23+
console.log('[+] Root Detection Bypass Successful');
24+
} catch (e) {
25+
console.log('[-] Root Detection Bypass Error: ' + e);
26+
}
27+
28+
// SSL Pinning Bypass
29+
try {
30+
var CertificatePinner = Java.use('okhttp3.CertificatePinner');
31+
32+
// Override both common overloads to bypass SSL Pinning
33+
CertificatePinner.check.overload('java.lang.String', 'java.util.List').implementation = function (hostname, peerCertificates) {
34+
console.log('[+] Bypassing SSL Pinning for host: ' + hostname);
35+
return; // Bypass SSL pinning
36+
};
37+
38+
CertificatePinner.check.overload('java.lang.String', 'java.security.cert.Certificate').implementation = function (hostname, certificate) {
39+
console.log('[+] Bypassing SSL Pinning for host: ' + hostname);
40+
return; // Bypass SSL pinning
41+
};
42+
43+
console.log('[+] SSL Pinning Bypass Successful');
44+
} catch (e) {
45+
console.log('[-] SSL Pinning Bypass Error: ' + e);
46+
}
47+
});

0 commit comments

Comments
 (0)