• Welcome to Valhalla Legends Archive.
 

How to write Packet Sniffer

Started by gotcha_ass, January 19, 2003, 01:19 PM

Previous topic - Next topic

gotcha_ass

I know Vb tryin to learn C++ and like to play around on Bnet. I want to learn what goes on behind the scenes so I can write up my own code. So I guess the first thing I need is a packet sniffer, but Id like to write my own, any jumping off points? Also, is there anything else I should get?

Etheran

#1
Here's where I would begin: make a hook and listen to the Send and Recieve functions(just a theory don't ask me how to make a hook or if this actually works).

gotcha_ass

#2
I got the hook thing jus not sure how to make it work, anyone else got any ideas? ???

Adron

#3
You could download winpcap and use their api to capture packets. It's not very hard to use.

You could also use raw sockets on some platforms.

drivehappy

#4
I edited my registry in battle.net to connect to my winsock control and any data that flows through that out through the one connected to the battle.net server. This way you can moniter the packets. My real problem with this was that the D2 client would connect to yet another IP for the actual game, and I couldn't figure out where to get that from and how to change it. I've been looking for the API's to WinPCap as well... Adron could you post a link to them?

Mesiah / haiseM

#5
does it have a socket for udp protocol? or does it dissallow in game features?
]HighBrow Innovations
Coming soon...

AIM Online Status: