-
Notifications
You must be signed in to change notification settings - Fork 5
Sniffing Steam network protocol
In order to build bots such as Sentinel Bot one has to mimic behavior of the native client. Steam network protocol is built on top of Protocol Buffers which simplifies things a lot.
SteamKit2 library which this bot also uses provides low level APIs for communicating with Steam network without having to need to reverse engineer the protocol yourself. But it does not provide high level APIs for specific Dota 2 commands. Those commands you have to reproduce yourself by sniffing Steam network.
SteamKit2 comes with 2 useful tools for that purpose: NetHook2 and NetAnalyzer2.
NetHook2 provides means of intercepting Steam network traffic and dumping it for further inspection. When you build the project it produces a DLL which you can inject into Steam process which in turn will start dumping network traffic. All you have to do is use the specific functions in the native client that you are interested in and then check what kind of information is needed to reproduce those functions. Follow the instructions how to use it. If you are not up to the challenge of building the DLL yourself you can try downloading it here.
NetAnalyzer2 is a GUI tool which you can use to read the data that was dumped with NetHook2. If you don't want to build it yourself you can try downloading it here.