, FiddlerScript can do pretty much anything you can do in a C# extension (including this task) but in practice it's usually a lot better to do advanced operations using C# because then you can use Visual Studio's debugger to step through your extension and fix problems you encounter, examine variables at breakpoints, etc.
The primary object of interest is FiddlerApplication.oAutoResponder
, which represents the Fiddler AutoResponder. You can call the various AddRule
methods to create new rules; you'll probably want to use the overload:
public ResponderRule AddRule(string sRule, Session oImportedSession, string sDescription, bool bEnabled)
So, inside OnBeforeResponse
you'd do something like:
Do take care that your rules list doesn't grow too
huge-- Fiddler has to load the entire response for each rule every time it restarts, so a huge autoresponder rule list may slow your startup performance.
Best of luck!