Skip to content

Commit b13d28e

Browse files
author
Konrad Kollnig
committed
Fix OKHTTP 4.2.0+
1 parent 266dbb8 commit b13d28e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/src/main/java/just/trust/me/Main.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,19 @@ protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Thr
533533
// pass
534534
}
535535

536+
try {
537+
classLoader.loadClass("okhttp3.CertificatePinner");
538+
findAndHookMethod("okhttp3.CertificatePinner",
539+
classLoader,
540+
"check",
541+
String.class,
542+
List.class,
543+
DO_NOTHING);
544+
} catch (XposedHelpers.ClassNotFoundError | ClassNotFoundException | NoSuchMethodError e) {
545+
Log.d(TAG, "OKHTTP 4.2.0+ (check) not found in " + currentPackageName + " -- not hooking");
546+
// pass
547+
}
548+
536549
}
537550

538551
void processHttpClientAndroidLib(ClassLoader classLoader) {

0 commit comments

Comments
 (0)