Monday, June 22, 2009

Fiddler – Tips & Tricks

Fiddler does not capture traffic to http://localhost/

The reason that this happens is that IE does not use the entire network stack when processing traffic from http://localhost/ or http://127.0.0.1/. And because the complete stack is not used, Fiddler does not see the traffic that is being sent to these addresses. The easiest work around for this is that you use your machine name instead of localhost.

How to modify the request data that is being sent to a web-site using Fiddler.

There are many ways to skin this cat. You can write custom script, you can write a plugin, etc.

But the easiest method is to enable breakpoints in Fiddler. Fiddler will break any request and allow you to inspect and modify the request before sending it along.

Here is how:

Turn on break points for before requests:

image

Hit the web-site that you wish to modify the request off.

The minute Fiddler detects the request, it will break the request and give you a chance to modify the request.

The red icon in the web-sessions panel represents a request that has hit a break point and is waiting for your input. If you select the entry, you will find that in the right pane, it will show you options to respond to the break point.

image

Before selecting “Run to Completion”, you can modify the response headers using the TextView of the Request headers (upper right pane).

If you select “Break on Response”, you will get a chance to modify the response headers using the TextView (lower right pane).

No comments: