This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10080|Reply: 1

Fiddler4 plugin development tutorial

[Copy link]
Posted on 9/29/2018 10:23:21 AM | | | |
Fiddler4 is a 。。。。。

Connected here:The hyperlink login is visible.

The development documentation is here:The hyperlink login is visible.

------- dividing line----------------------

Let's talk about what kind of plugin you plan to develop, because the interface provided by Fiddler is relatively pit (→_→), so it's important to be clear about what plugin you want to develop

The following is the popular science time: Fiddler4 public interfaces have the following categories

IFiddlerExtension,IAutoTamper,IAutoTamper2,IAutoTamper3

1. These interfaces are all plug-ins for the whole world,

2. The location of the plug-in is the same as Log and TimeLine

3. Plugins compiled into dlls can only be placed in the scrip{filter}ts folder

Inspector2,IResponseInspector2,IRequestInspector2

1. These interfaces are oriented to a single connection

2. The plugin will appear under the Inspector menu and the same level as Headers and TextView

3. Plugins compiled into dlls can only be placed in the Inspectors folder

IHandleExecAction is an interface that allows your control to receive commands from the command line

ISessionExporter,ISessionImporter

1. As the name suggests, import and export requests in batches. For example, batch export to txt or something like that

2. The location appears in the right-click menu Save-Selected Session- and the pop-up menu of File-ImportSession

3. The dll needs to be placed in ImportExport

ps:位置如图:



ps2:如果你同时在一个dll中写2中插件,Fiddler会根据你的dll在 scrip{过滤}ts还是Inspector下还是ImportExport 只能加载其中1种
ps3:Inspector 文件夹指的是: C:\Users\XXXX\Documents\Fiddler2\Inspectors 和C:\Program Files (x86)\Fiddler2\Inspectors

The scrip{filter}ts folder refers to: C:\Users\XXXX\Documents\Fiddler2\scrip{filter}ts and C:\Program Files (x86)\Fiddler2\scrip{filter}ts

The ImportExport folder refers to: C:\Users\XXXX\Documents\Fiddler2\ImportExport and C:\Program Files (x86)\Fiddler2\ImportExport

fix: 在Documents\Fiddler2\下可能只有 scrip{过滤}ts文件夹没有Inspectors与ImportExport 自己新建便可

fix: Interfaces that do not count as interfaces If you want to get your hands on the main menu of Fiddler4, then:http://docs.telerik.com/fiddler/Extend-Fiddler/AddMenuItems

------- dividing line----------------------

Preparation:

1. Install the fiddler4 manual doge face

2. VS10 and above (VS13 for my demonstration)

3. Enable the Fiddler Debug related function

Enter in this location:




Official start:

1. Create a new C# library project (fix net4 in the figure below)




2. Add Fiddler4.exe reference to the right click of the project



3. Add a specific attribute [assembly: Fiddler.RequiredVersion("4.6.2.0")] to the AssemblyInfo.cs file (note as shown in the figure below, because the version of Fiddler4 I use is 4.6.2.0)



4. New class inheritance and interfaces exposed in the previous article!!!Pay attention to new !!! This class cannot have a namespace

The following code:


where the TestView is the user control

5. Create a new user control (Winform's thing) - right-click on the project to add a user control




6. Compile and then copy your dll to scrip{filter}ts to see if it succeeds?

If you think that each copy is too complicated, you can try the operation:




-------------------------- Dividing Line-------------------------------------------

About debugging can be used directly vs attach processes




End




Previous:How to call the MYSQL class
Next:bat conversion exe tool
Posted on 9/29/2018 12:27:08 PM |
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com