views:

132

answers:

4

Hi I need loging all HTTP request (from any application). I have Delphi 7.0. Anybody know how do that?

A: 

Do you have to write a Delphi app to do it? Could you use an application like ethereal?

Toby Allen
+7  A: 

I looked into whether the Indy components could do this but found an old newsgroup response from Remy Lebeau that said:

If...you want to look at the traffic that other applications are generating, then no, you cannot use Indy for that. That is outside the scope of what Indy is designed for. You would have to write your own NDIS driver for that kind of capturing. Or use a third-party sniffer API, such as WinPCap.

_J_
There is even a Delphi wrapper for WinPcap: http://www.magsys.co.uk/delphi/magmonsock.asp
mghie
+1  A: 

What about WireShark?

There is also a product called Fiddler. I have found this extremely useful to track down exactly what the Indy components are sending/receiving. The one drawback is you have to utilize a proxy. This isn't a problem with Indy components and browsers such as Firefox. But if you need to capture for all applications you would need to be able to set a proxy for those apps.

M Schenkel
WireShark is successor of Ethereal, and uses WinPcap. So these answers all point to the same...
mghie
+1  A: 

if you want to go deeper and want pure delphi thing, there is winsock logger program floating around, google might help you ( it hooks winsock apis though).

avar