DVD
DVD

Reputation: 1784

Intercept HTTP requests

I've some fishy application that makes HTTP requests to a website, i would like to intersect that request and send other data to the server. Is that possible in C#,java or C++?

EDIT: The application isn't mine, i just know the endpoint that it sends http requests

Upvotes: 3

Views: 2944

Answers (4)

Nim
Nim

Reputation: 33655

Firstly are you aware of how it is connecting to the internet? For example, is it using the settings from Internet Explorer, or is it establishing a direct connection? If the latter, this may be tricky, there is no direct port forwarding as there in Linux, so you'll need some third-party tools to redirect the traffic to a server (which you can write in Java, C++ or C#, I would go for C# if you know it for pure speed of development) In that server you can intercept the request, and then create your own to actually send to the real destination.

Sounds like a cludge, but I think you're stuck with this approach due to the lack of direct port forwarding. You'll have to configure the third-party tool that you use to forward someother well known port to 80, and your server should write to this.

Upvotes: 0

Scott
Scott

Reputation: 13921

You may want to look into using an HttpModule, whose purpose is to intercept incoming HTTP requests.

The ASP Column: HTTP Modules

Upvotes: 0

Mike Chess
Mike Chess

Reputation: 2798

Fiddler might provide the functionality you need. At the very least it may enable you to see what is being sent to the web site.

Upvotes: 5

Jigar Joshi
Jigar Joshi

Reputation: 240860

in Java You can intercept request from Filter

Upvotes: 1

Related Questions