Added OK HTTP SSL Pinning bypass

OK HTTP by squareup. Tested against version 2.5
This commit is contained in:
Anant Shrivastava
2015-11-17 13:30:31 +05:30
parent 98f114f884
commit 9decbfe65a

View File

@@ -206,6 +206,19 @@ public class Main implements IXposedHookLoadPackage {
return null;
}
});
/* hooking OKHTTP by SQUAREUP */
/* com/squareup/okhttp/CertificatePinner.java available online @ https://github.com/square/okhttp/blob/master/okhttp/src/main/java/com/squareup/okhttp/CertificatePinner.java */
/*public void check(String hostname, List<Certificate> peerCertificates)
throws SSLPeerUnverifiedException{}*/
/* Either returns true or a exception so blanket return true */
/* Tested against version 2.5 */
findAndHookMethod("com.squareup.okhttp.CertificatePinner", lpparam.classLoader, "check", String.class, List.class, new XC_MethodReplacement() {
@Override
protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable {
return true;
}
});
/* Only for newer devices should we try to hook TrustManagerImpl */
if (hasTrustManagerImpl()) {