1

I want to write a little c# tool for a web application (which runs inside a browser). Unfortunately, I have no idea how to hang into the HTTP communication.

There are a lot of tools that listen to network traffic and extracting relevant data out of it so I guess there must be a solution. My current approach is to catch the responses by listening on the corresponding port. But:

  • HTTPListener seems to be a server-side class that accepts HTTP requests
  • HTTPRequest is just the message object and has to be received before
  • I don't think TCPListener would be applicable because I don't want to create a connection

Is there another solution how to just get the server response without sending a request? Or might another approach be more reasonable?

I don't want to write a proxy because I simply don't want a server, just a lightweight, easy-to-use tool. I was not able to find any hints on this topic since all results of my searches were about receiving responses to own requests or similar.

Thanks in advance for any solutions or suggestions!

Phil


If you don't got the idea of the tool, here is an example:

  1. A user has firefox running and navigates to the target web application
  2. He does anything and the web application sends the corresponding data to the web server
  3. The web server processes the request and sends back a response
  4. The web application updates itself inside the browser to display the received data

My tool (C# application) should do the following:

  • Catch the response of step 3 and evaluate the response to also update its own state
  • OR: do anything else (suggestions?) to keep its state up-to-date
Phil
  • 61
  • 4
  • Btw. this question http://stackoverflow.com/questions/2468957/how-to-capture-http-response-with-c?rq=1 seems to be closely related. But the suggested solutions are proxy and server-side. Both is not applicable. – Phil Jul 28 '13 at 11:23

0 Answers0