Created
May 28, 2019 11:28
-
-
Save 1mm0rt41PC/cd492f24dc061019fb25222ba0b96d20 to your computer and use it in GitHub Desktop.
Frida script - Bypass certificate pinning and Enable webview debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Java.perform(function() { | |
var array_list = Java.use("java.util.ArrayList"); | |
var ApiClient = Java.use('com.android.org.conscrypt.TrustManagerImpl'); | |
// Cert pin bypass by https://techblog.mediaservice.net/2018/11/universal-android-ssl-pinning-bypass-2/ | |
ApiClient.checkTrustedRecursive.implementation = function(a1,a2,a3,a4,a5,a6) { | |
console.log('Bypassing SSL Pinning'); | |
var k = array_list.$new(); | |
return k; | |
} | |
var WebView = Java.use('android.webkit.WebView'); | |
WebView.loadUrl.overload("java.lang.String").implementation = function (s) { | |
console.log('Enable webview debug for URL: '+s.toString()); | |
this.setWebContentsDebuggingEnabled(true); | |
this.loadUrl.overload("java.lang.String").call(this, s); | |
}; | |
},0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment