How to modify a responsebody compressed with an unsupported algorithm with fiddler - fiddler

I want to modify the responsebody.
However, the data is compressed by Brotli, which fiddler does not support.
I want to set a response breakpoint.
When fiddler break on the response.
I decompress the data with a tool, modify it and compress the modified data.
Copy the modified data to the fiddlerscript and save the fiddlerscript.
But I find that the response breakpoint breaks after the response arrived.
So when I resave the fiddlerscript, the script won't work on the breaked response.
How can I modify a responsebody compressed with an unsupported algorithm?

You can install the Compressibility add on from http://www.telerik.com/fiddler/add-ons. This adds Brotly support to Fiddler at present.

Related

Modifying a zip file response with HTTP Toolkit

I have a watch, whose app downloads a zip file from here, processes it, and sets the new watch face. What I want to do, is intercept the response from the server, and modify the zip file, and send it to the app. I am able it intercept, using HTTP toolkit, but when I download the zip, modify it, and then "inject" it, it doesn't accept. Even if I just download it, convert it to plain text, and then inject it without modifying anything, it still returns an error. The zip converted to plaintext is different from the raw data.
How to resolve this, so that I can modify the zip, and have the app still accept it ?
P.S: I'm converting it to plain text by just changing the extension from .zip to .txt

how to compress file in sapui5 before uploading on server in instant upload?

I want to compress a file before uploading it on server in sapui5 (image(png/jpeg/jpg)/pdf/). I want to upload a large files but i want to compress that file before uploading. Please suggest me solution ?
I think you will not be able to do it with instant upload. Instead, you should obtain the file from the change event of the file uploader (check out the change event, it has a files parameter).
You can then use that file object together with the zip.js library to create an in-memory zip and save it into e.g. a Blob. Afterwards you simply send the blob into a POST request (e.g. look at How can javascript upload a blob?). Maybe you should also provide some file-uploading specific headers (like the Slug).

Editing a gzip content in mitmproxy

I'm trying to edit the content of a Request in mitmproxy and pass it over, but the content of the body is encoded by gzip. I can see the structure of data which is like xml, but I cannot edit it and save it in gzip format. How can I resolve this issue? I tried different tutorials, but none of them are going into detail in that level
I was not able to get this to work using mitmproxy 0.11.1, because every time I tried to edit the response, the body would open in my text editor as the raw gzipped source. However, it did work in mitmproxy 0.11.3. Unfortunately, there appear to be no release notes for the 0.11.2 or 0.11.3 releases.
I set up an i ~bs (response body) intercept hook, and a l ~bs filter to display the intercepted message. I loaded the page in a browser, opened the request, pressed tab to view the response body, hit e to edit, and r for raw body. That opened my editor with the body response as unformatted ASCII text, not the raw gzipped encoding. After saving a one-character change and exiting the editor, I hit a to accept and send the updated message, and saw the change in the web browser developer tools.
However, on several other occasions while doing this and changing a lot of characters in the response body, mitmproxy crashed.

Continue with previous downloaded session without using ASIHTTPRequest

By using the ASIHTTPRequest and ASIDownloadCache i am able to continue with previous downloaded session.Now I don't want to use ASIDownloadCache.So,is there any alternatives to achieve it.
Thanks in advance.
If the server supports it, you can specify the Content-Range field in the header of your HTTP request and ask only for a small portion of the file at once. When you get all portions, you can assemble the file together.
You can set HTTP headers with NSMutableURLRequest setValue:#"0-1023/*" forHTTPHeaderField:#"Content-Range"];, this example downloads only the 1024 byte of the file. See also Content-Range in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
This way you can download the file in parts and next time when you want to resume the download you can continue it from the next part that you don't have yet.

Fiddler - Detect if data was GZipped

Using Fiddler2, how can I detect if the response stream was in fact GZipped?
With Fiddler, simply click the Inspectors tab, then click the Transformer response inspector. It will tell you exactly what encodings have been applied.
Be sure that the "AutoDecode" option isn't checked in the Fiddler toolbar.
There is a special magic marker that denotes a gzipped archive, the first two bytes, namely 0x1f and 0x8b tells it is a gzip archive. The RFC 1952 will give more information on this.
You can find out more by checking wotsit and also on wikipedia.