File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
app/src/main/java/just/trust/me Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -502,6 +502,28 @@ protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Thr
502
502
Log .d (TAG , "OKHTTP 3.x not found in " + currentPackageName + " -- not hooking OkHostnameVerifier.verify(String, X509)(" );
503
503
// pass
504
504
}
505
+
506
+ //https://github.com/square/okhttp/blob/okhttp_4.2.x/okhttp/src/main/java/okhttp3/CertificatePinner.kt
507
+ Log .d (TAG , "Hooking okhttp3.CertificatePinner.check(String,List) (4.2.0+) for: " + currentPackageName );
508
+
509
+ try {
510
+ classLoader .loadClass ("okhttp3.CertificatePinner" );
511
+ findAndHookMethod ("okhttp3.CertificatePinner" ,
512
+ classLoader ,
513
+ "check$okhttp" ,
514
+ String .class ,
515
+ "kotlin.jvm.functions.Function0" ,
516
+ new XC_MethodReplacement () {
517
+ @ Override
518
+ protected Object replaceHookedMethod (MethodHookParam methodHookParam ) throws Throwable {
519
+ return null ;
520
+ }
521
+ });
522
+ } catch (ClassNotFoundException e ) {
523
+ Log .d (TAG , "OKHTTP 4.2.0+ not found in " + currentPackageName + " -- not hooking" );
524
+ // pass
525
+ }
526
+
505
527
}
506
528
507
529
void processHttpClientAndroidLib (ClassLoader classLoader ) {
You can’t perform that action at this time.
0 commit comments