Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to share and maintain multiple Fiddler scripts?

Tags:

fiddler

I have many custom and independent FiddlerScript extensions that I want to maintain and share with colleges.

Currently (and that's the only way I know) all those script parts are located in the %USERPROFILE%\Documents\Fiddler2\Scripts\CustomRules.js file, I don't know how to create one script file per functionality. Additionally, most extensions are spread across the script file, because they require code in different event handlers (like e.g. OnBeforeRequest), and define configurable settings like checkboxes. This makes it really hard to identify all parts belonging to a single extension.

While I could copy the whole CustomRules.js file, it would be annoying for all recipients of the file to re-include all custom additions each the time document changes.

Is there any way to either create a separate Script file or encapsulate the extensions in closed blocks (i.e. attach to the events like OnBeforeRequest outside of the static function OnBeforeRequest(oSession: Session) functions)?

The solution should work with the vanilla Fiddler, without any modifications to Fiddler itself. (Re-)creating all required extensions as .NET extensions is not a working solution for me as well.

like image 359
muffel Avatar asked Nov 09 '15 09:11

muffel


1 Answers

Currently, no, there's no way to do this, although folks ask for this sort of functionality from time-to-time, and capabilities of this nature could conceivably be added at some point in the future. For now the expectation is that functionality useful enough to be shared is useful enough to be compiled into a Fiddler Extension assembly.

You might find this extension: https://github.com/vcsjones/FiddlerScriptCSharp interesting, as it offers the sort of capabilities you describe, using C# as the scripting language instead of JScript.NET.

like image 171
EricLaw Avatar answered Nov 13 '22 05:11

EricLaw