Click here to Skip to main content
Click here to Skip to main content

Fiddler Extension - Fiddler Tap

, 1 Aug 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
Fiddler extension to tap all traffic to other host

Introduction

Fiddler is a good web debugging proxy. It is easy to use since it uses WinINET layer to capture all web traffic. However, as times goes on, it is not easy to find the session so we need to transform the data to another format and store in database. This article is to illustrate how to use the IFiddlerExtension and IAutoTamper interface to write our own plugin.

Background

The idea to tap the traffic to other host is to use HTTP post to send all related information stored in sessions to remote server. Host url is configured in the textbox of tap of fiddlertap. However, each post takes time since there is network latency. To avoid the performance deduction of Fiddler due to fiddlertap, use event to call another subroutine indirectly to avoid blocking.

Using the Code

I have attached the compiled extension and source code with zipped format separately.

You can simply put the compiled DLL in the Scripts folder of Fiddler. There will be a new tap in Fiddler.

fiddlertap.png

Each callback from FiddlerApplication will block the process of next session. Otherwise it will affect the performance of Fiddler itself. However, the idea of this plugin is to tap the session to remote host. There will be network latency when sending session's information. So we use non-block event handling to release the callback and use our own callback to process. As a result, you will see some new coming session finished their transaction before older session's transaction.

First, we have to define an event. We have to define an event object, event handler and event argument.

public static event TapPacketHandler EventTapPacket;
public delegate void TapPacketHandler(object o, TapPacketEventArgs e);
public class TapPacketEventArgs : EventArgs
{
    public readonly Session theSession;

    public TapPacketEventArgs(Session s)
    {
        theSession = s;
    }
}

Second, we trigger an event inside AutoTamperResponseAfter.

public void AutoTamperResponseAfter(Session oSess) {
   if (EventTapPacket != null && !bSwitch)
   {
       EventTapPacket(new object(), new TapPacketEventArgs(oSess));
   }
}

History

  • July 30, 2011 - This is the first version of the Fiddler extension, FiddlerTap

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

fooksuen
Software Developer Nokia Siemens Networks
Hong Kong Hong Kong
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.141022.2 | Last Updated 1 Aug 2011
Article Copyright 2011 by fooksuen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid