> How is it possible to listen a TCP/IP communication on a dedicated port
> (spy) with Delphi 7?
You mean someone else's connection? Install an Ethernet sniffer,
like Ethereal or the Network Monitor driver that comes with Windows.
Then, if you're really bent on having Delphi in the loop, write a
log analyser in it or whatever. But Delphi is an applications
programming tool, not a driver kit or system programming environment.
Groetjes,
Maarten Wiltink
"Maarten Wiltink" <maa...@kittensandcats.net> wrote in message
news:47a70f31$0$85786$e4fe...@news.xs4all.nl...
> I know sniffers but these tools are nice to scan all ports and IP
> adresses within a range.
> When I know the port, I just would like to listen this port and log
> the communication data.
You can have a very short range, of just the port you're interested in.
> Then I would like to do it with a Delphi application.
And I'd like to ride a broomstick to work. But my bicycle is just a
better tool for the job.
Groetjes,
Maarten Wiltink
"Maarten Wiltink" <maa...@kittensandcats.net> wrote in message
news:47b00c12$0$85789$e4fe...@news.xs4all.nl...
> I just need to listen one dedicated port (known)
> Then with Delphi (Indy?) I just need to be able to select the port number
> and get log,
> that's all!!!
You seem to think that it makes it easier when it's only one port.
The truth is, if you can sniff one port, you can sniff them all.
Get yourself libpcap (winpcap) and make it work from Delphi if you
must. But remember that there is no advantage in doing so.
Groetjes,
Maarten Wiltink
If you want to spy all network traffic and pick packets that have been
addressed to some dedicated IP-address + port number, then this task is
beyond the capabilities of Indy.
Indy will never even get and see those packets that are addressed to
some other computer. You'll have to dig deeper down the Windows TCP/IP
stacks, and then you'll soon find that a C++ written piece of DLL
software called WinPCap is often used for this purpose.
Once you learn how to integrate WinPCap to your Delphi written user
interface you will be so good an expert you will no more have to ask
beginner questions from us:)
There might be someone who already has coupled some low level packet
handling package with Delphi, but I had no inerest start googling after
it. Good luck.
....
ehhhh, you know what, this is your LUCKY TUESDAY!!!
Against my words, I did put google to work for 5 seconds. I noticed that
my years long, favorite packet sniffer tool Packetyzer has released
their sources in Sourceforge.
And the lucky part is that the user interface source seems to be
Delphi/Kylix based. http://sourceforge.net/projects/packetyzer/
I did not take time to start going through what's in that chunk. And
this time this is my final word.<g>