Add unpinning for okHTP 3.x

This commit is contained in:
Ryan Welton
2016-01-20 12:21:23 -05:00
parent 8cef702156
commit 482d1166d1

View File

@@ -227,6 +227,21 @@ public class Main implements IXposedHookLoadPackage {
// pass // pass
} }
//https://github.com/square/okhttp/blob/parent-3.0.1/okhttp/src/main/java/okhttp3/CertificatePinner.java#L144
try {
Class.forName("okhttp3.CertificatePinner");
findAndHookMethod("okhttp3.CertificatePinner", lpparam.classLoader, "check", String.class, List.class, new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable {
return null;
}
});
} catch(ClassNotFoundException e) {
// pass
}
/* Only for newer devices should we try to hook TrustManagerImpl */ /* Only for newer devices should we try to hook TrustManagerImpl */
if (hasTrustManagerImpl()) { if (hasTrustManagerImpl()) {