Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: gotcha_ass on January 19, 2003, 01:19 PM

Title: How to write Packet Sniffer
Post by: gotcha_ass on January 19, 2003, 01:19 PM
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?
Title: Re: How to write Packet Sniffer
Post by: Etheran on January 19, 2003, 03:06 PM
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).
Title: Re: How to write Packet Sniffer
Post by: gotcha_ass on January 19, 2003, 05:32 PM
I got the hook thing jus not sure how to make it work, anyone else got any ideas? ???
Title: Re: How to write Packet Sniffer
Post by: Adron on January 21, 2003, 04:56 AM
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.
Title: Re: How to write Packet Sniffer
Post by: drivehappy on January 27, 2003, 07:36 PM
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?
Title: Re: How to write Packet Sniffer
Post by: Mesiah / haiseM on January 27, 2003, 08:28 PM
does it have a socket for udp protocol? or does it dissallow in game features?