Created
August 26, 2022 18:39
-
-
Save aancw/2ccae6df125637799536820483b09cbc to your computer and use it in GitHub Desktop.
ssl frida error
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 () { | |
const UnverifiedCertError = Java.use('javax.net.ssl.SSLPeerUnverifiedException'); | |
UnverifiedCertError.$init.implementation = function (str) { | |
const stackTrace = Java.use('java.lang.Thread').currentThread().getStackTrace(); | |
const exceptionStackIndex = stackTrace.findIndex(stack => | |
stack.getClassName() === "javax.net.ssl.SSLPeerUnverifiedException" | |
); | |
const callingFunctionStack = stackTrace[exceptionStackIndex + 1]; | |
const className = callingFunctionStack.getClassName(); | |
const methodName = callingFunctionStack.getMethodName(); | |
console.log(` =================`); | |
console.log(` Debugging Stack Trace for SSLPeerUnverifiedException`); | |
console.log(` Thrown by ${className}->${methodName}`); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment