Last active
May 6, 2022 06:41
-
-
Save tiiime/e8ec790bdf3ab0e71c0f4a96bb940e62 to your computer and use it in GitHub Desktop.
frrida log okhttp request
This file contains hidden or 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
// frida -U ${package} -l request.js | |
Java.perform(function () { | |
var OkHttpClient = Java.use("okhttp3.OkHttpClient"); | |
var RealCall = Java.use("okhttp3.RealCall"); | |
OkHttpClient.newCall.implementation = function (request) { | |
var result = this.newCall(request) | |
console.log(request.toString()) | |
return result | |
}; | |
RealCall.getResponseWithInterceptorChain.implementation = function () { | |
var response = this.getResponseWithInterceptorChain() | |
console.log(response.toString()) | |
return response | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sometimes u need use this ->
Java.use("okhttp3.internal.connection.RealCall");
getResponseWithInterceptorChain$okhttp();
:)