Skip to content

Commit f5ced37

Browse files
authored
fix: set DEBUG_MODE variable and add Conscrypt bypass (#41)
1 parent ca44ede commit f5ced37

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

android_unpinner/scripts/httptoolkit-unpinner.js

+21-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*
2727
*************************************************************************************************/
2828

29+
const DEBUG_MODE = false;
30+
2931
function buildX509CertificateFromBytes(certBytes) {
3032
const ByteArrayInputStream = Java.use('java.io.ByteArrayInputStream');
3133
const CertFactory = Java.use('java.security.cert.CertificateFactory');
@@ -430,8 +432,26 @@ const PINNING_FIXES = {
430432
};
431433
}
432434
}
435+
],
436+
437+
'com.android.org.conscrypt.TrustManagerImpl': [
438+
{
439+
methodName: 'checkTrustedRecursive',
440+
replacement: () => {
441+
const arrayList = Java.use("java.util.ArrayList")
442+
return function (
443+
certs,
444+
host,
445+
clientAuth,
446+
untrustedChain,
447+
trustAnchorChain,
448+
used
449+
) {
450+
return arrayList.$new();
451+
}
452+
}
453+
}
433454
]
434-
435455
};
436456

437457
const getJavaClassIfExists = (clsName) => {

0 commit comments

Comments
 (0)