Last active
July 21, 2023 11:05
-
-
Save llamaonsecurity/fc6860fc62ecd5e5c1a6fa348622cfbf to your computer and use it in GitHub Desktop.
Revisions
-
llamaonsecurity revised this gist
Jun 26, 2017 . No changes.There are no files selected for viewing
-
llamaonsecurity revised this gist
Jun 26, 2017 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -22,9 +22,8 @@ var res2 = Java.use('com.android.okhttp.Response$Builder'); console.log("ResponseBody"); //breaks app, because readByteArray function clears input stream var body = par2.readByteArray() //Comment this line if you want app to process request console.log(base64.encodeToString(body, 0)); //Comment this line if you want app to process request this.$init(par1, par2); } -
llamaonsecurity renamed this gist
Jun 26, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
llamaonsecurity created this gist
Jun 26, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ Java.perform(function() { var res2 = Java.use('com.android.okhttp.Response$Builder'); res2.build.implementation = function() { var response = this.build(); console.log(response.headers()) //console.log(response.message()) var rBody = response.body(); //console.log(rBody.source()) console.log("## REQ ### "); console.log(response.request()); console.log(response.request().headers()); console.log("## -REQ- ### "); return response; }; var base64 = Java.use('android.util.Base64'); var RealResponseBody = Java.use('com.android.okhttp.internal.http.RealResponseBody'); RealResponseBody.$init.overload('com.android.okhttp.Headers', 'com.android.okhttp.okio.BufferedSource').implementation = function(par1, par2) { console.log("ResponseBody"); //breaks app, because readByteArray function clears input stream var body = par2.readByteArray() console.log(base64.encodeToString(body, 0)); this.$init(par1, par2); } });