Skip to content

Instantly share code, notes, and snippets.

View aancw's full-sized avatar
🏠
Working from home

Aan aancw

🏠
Working from home
View GitHub Profile
@aancw
aancw / ssl-error.js
Created August 26, 2022 18:39
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();