fiddlerfiddlercorefiddler-dev

Start and stop Fiddler from command line


I have the following requirement:

I need to start Fiddler from the command line. It will start capturing my traffic immediately. After some time, I want to stop capturing the traffic, but not close Fiddler.

What is the best way to achieve this ? I've explored Fiddler's command-line options, but they will only start Fiddler and not stop it. Also, killing the Fiddler process will not save my session safely. Please help.


Solution

  • There are several ways to do this. The simplest is to run

    %programfiles(x86)%\fiddler2\execaction.exe stop

    This calls the execaction program in the Fiddler install folder, passing it the command stop. The stop message is sent to Fiddler, whose script handler (click Rules > Customize Rules, scroll to OnExecAction) will interpret it as a command to detach as the system proxy.

    To reattach the proxy, use start as the command. You can see what other commands are available (and add your own) by looking at the OnExecAction function.