Skip to content

Instantly share code, notes, and snippets.

@alyatwa
Forked from tiiime/frida-okhttp3.js
Last active March 16, 2021 01:07
Show Gist options
  • Save alyatwa/9e381c4a5c6934643e3e26ab90c66295 to your computer and use it in GitHub Desktop.
Save alyatwa/9e381c4a5c6934643e3e26ab90c66295 to your computer and use it in GitHub Desktop.
frrida log okhttp request
// 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