Skip to content

Instantly share code, notes, and snippets.

@aancw
Created August 26, 2022 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aancw/2ccae6df125637799536820483b09cbc to your computer and use it in GitHub Desktop.
Save aancw/2ccae6df125637799536820483b09cbc to your computer and use it in GitHub Desktop.
ssl frida error
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