Sign in to follow this  
GroZZleR

Listening to another program's network traffic...

Recommended Posts

Is there a standard Win32 way to listen to another program's network traffic? Something similar in way to the way you listen to Window's messages? I'm trying to write a utility for Magic: The Gathering Online to watch for specific sales messages in the market place (a big chat window where people advertise their cards and is ridicuouslly spammed) and notify me if any specific cards are being offered. Any ideas on a solution?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Etheral is a packet sniffer based around the winpcap library - both are open source, so I'd suggest that you could try this as a starting point (you still need to work out which packets belong to the chat thingy, but this should be fairly easy as I'd imagine that the server IP will not change). Obviously you also need to work out what the packet format is too...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I think you should also read your game's EULA (end user license agreement).
Most of these online games strictly prohibit this kind of stuff, and it will
likely get your account terminated.

Share this post


Link to post
Share on other sites
It's probably a bad idea to do this and if you have to ask how to do these things it means you shouldn't be doing it.

But if you must... winpcap is a good place to start... but take heed, Windows XP SP2 has disabled raw sockets and I do not believe winpcap now works without extensive hacking.


Share this post


Link to post
Share on other sites
Ah - if there's not a standard Win32 way of doing it, I'm not looking to get into it. I guess it is a bit of a fine line, as I'm merely watching the traffic, not trying to mess with it.

Ah well - thanks for your suggestions none the less.

Share this post


Link to post
Share on other sites
There's a thing called promiscuous mode, which I think works only in Windows XP. Using it you get to see all the raw traffic that goes trough your network card. You even have to decode packet headers manually. You can even spy on other computers if you are in a LAN built with hubs (as opposed to switches) since all traffic gets sended to every computer. I once did a software that spies web addresses other people visit by listening http-requests. Isn't very ethical though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this