Jump to content
  • Advertisement
Sign in to follow this  
basananas

[Winsock] Reading from a socket without being connected?

This topic is 4829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I want to make a program that notifies me when a particular person comes online in msn. Therefor, I need to be able to see what the msn client receives from the server. My question: is there any way to read what is being received over a particular port without being connected? I hope someone can answer this. Thanks, Bas

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by SiCrane
Yes, you can, but doesn't MSN messenger have a feature that does this built-in?


Haha, yeah there is. But I want a little LED to light up...

I've looked into network sniffers (and in particular Windump/WinPcap), but for some reason they give no output. Do you know another way to read from the same port as msn does or should I concentrate on trying to make Windump work?

Thanks,
Bas

Share this post


Link to post
Share on other sites
Quote:
Original post by basananas
I've looked into network sniffers (and in particular Windump/WinPcap), but for some reason they give no output. Do you know another way to read from the same port as msn does or should I concentrate on trying to make Windump work?
One of the easier alternatives is to route MSNs traffic through your own program. I.e. set MSNs to connect to your own localhost server and let it in turn connect to the real server, then just route all packets through it and try to decipher the data.
You won't see any direct connections though, so don't expect to be able to log messages or file transfers, but online status shouldn't be a problem.

However it'd save a whole of work if you just switched to Miranda and wrote a plugin instead.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
GAIM has a "Buddy Pounce" feature that lets you run commands. That might be an easy way to do what you want.

Share this post


Link to post
Share on other sites
You should be able to trap socket traffic easily. If network sniffing tools like Ethereal seem to be working, then you'll need to look for specific problems in your own sniff code. There's also options like Transport Driver Interface and Layered Service Providers if you need more advanced traffic monitoring/manipulation abilities. Just be careful, though, because a lot of anti-spyware tools will notice unregistered TDI and LSP drivers and try to remove them as spyware.

The other option is a proxy - I don't know if the vanilla MSN client lets you do this (I doubt it) but many third-party clients let you connect directly to a custom server. In this case, you can open up a server on the loopback interface and turn it into a proxy that simply forwards the data back out to the official MSN server. (oops... too slow [smile])

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!