Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fiddler/C#: search content of request/response for special phrases

Tags:

c#

fiddler

this is my first visit to stackoverflow and right now I feel very comfortable with this site.

It already helped me to get the FiddlerCore embedded into MS Visual C# 2008 Express Edition.
Just needed to create a reference(Verweis) to the fiddlercore dll from Project Explorer(Projektmappenexplorer) in MS Visual C# EE. Hope this are the names for it in the english version. After this you can use Fiddler.FiddlerApplication stuff etc.

What is my task?

I want to create a small program which is able to use the FiddlerCore to check the bodies of requests/responds for special JavaScript Code.
This enables the developers to check wether their code is valid in another versions of there Browser (especially from IE 6.x to IE 8.x) or not. To be able to do so, I need to know:

How can I check the content of a requested or responded file for a String?


This must have something to do with the Text View Inspector (Fiddler), but I cannot find a possibility to access it with .net code or within Fiddler which would also help a lot already.

I should be able to finish the remaining stuff with some search by google or stackoverflow.
As this is my first time with .net languages this will be very interesting and demanding.

like image 879
TheChange Avatar asked Feb 19 '10 08:02

TheChange


People also ask

What is Fiddler used for?

The Fiddler tool helps you debug web applications by capturing network traffic between the Internet and test computers. The tool enables you to inspect incoming and outgoing data to monitor and modify requests and responses before the browser receives them.

Is Fiddler owned by Microsoft?

Summary. Fiddler is a third-party (non-Microsoft) web debugging proxy that logs all HTTP(S) traffic between a user's computer and the Internet.

Is Fiddler no longer free?

Try Fiddler Everywhere for Free, Then $10 a Month, Cancel Anytime. Fiddler Everywhere works across all platforms equally well—macOS, Linux, and Windows—and gives you supercharged inspecting, debugging, and mocking features.

What is the difference between Fiddler and postman?

Fiddler and Postman can be primarily classified as "API" tools. Typeform, Bukalapak, and PedidosYa are some of the popular companies that use Postman, whereas Fiddler is used by Skybox Security, Cloud Drive, and NeoQuant.


1 Answers

Take a look at this example. In the BeforeResponse callback a Fiddler.Session is passed as argument. This object has a method called GetResponseBodyAsString. As its name suggest you may try using it to get the response text. There's also a GetRequestBodyAsString method for the request.

like image 169
Darin Dimitrov Avatar answered Sep 29 '22 21:09

Darin Dimitrov