This repository has been archived by the owner on Jun 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 191
Home
bpm edited this page Dec 16, 2016
·
8 revisions
Welcome to the node-dota2 wiki!
- Check the README to see if the action you wish to perform has documented methods
- If there are no documented methods, perform the action in the client to see if it is possible. (e.g. If you wanted to make a party, try doing it manually in the client first) If you can't do it manually, then it is extremely unlikely that you will be able to do it with this library.
- If you can do this action manually, run Nethook and reproduce the action manually. Somewhat like wireshark, Nethook records the messages sent between your client and Valve servers. Dota2 uses protobuf messages, so you must use Nethook to record these in a usable form. Skip down to the Nethook section to read about its usage.
- Record your list of messages, and match them up to library functions. If your messages do not match up to anything, then you will probably need to extend the library. Making a new issue in our github with the Nethook dump and a description of the messages used, will go a long way towards someone else deciding to help you implement them.
Our thanks go to SteamRE
and their wonderful project that makes this project easier / possible to maintain. Parts of the guide below are copied from their guide.
- Grab a copy of Nethook from https://github.com/SteamRE/SteamKit/tree/master/Resources/NetHook2 You will need to compile it yourself, or rely on their appveyor (refer to using appveyor section below) or this old pre-compiled version.
- Ensure Steam and Dota2 are running. (Additionally, make sure you're prepared for the possibility for Steam to crash. Using NetHook2 isn't an exact science, and sometimes things break.)
- Execute the following in an elevated command prompt:
rundll32 "<Path To NetHook2.dll>",Inject
- If all goes well, you should see a console window appear with CCrypto lines, etc. If instead you see a failure message or your Steam process crashes, it's possible that an update to Steam may have broken one of NetHook2's binary signature scans and they will require updating. If you're on the beta branch of Steam, try using the non-beta version and vice versa. Additionally check to see if there's any recent NetHook2 related commits on our steamclient-beta branch. Provided everything successfully injected and hooked, NetHook2 will now begin dumping every message to file. You can locate the dumps in your Steam install, under the nethook directory. The directories are numbered with the unix time that dumping began.
- Manually perform the action you wish to use this library for. You should see something like
- Execute
rundll32 "<Path To NetHook2.dll>",Eject
. The console window will disappear and NetHook2 will eject itself from the running Steam instance.
Appveyor is a handy site that compiles projects. To grab a compiled Nethook2:
- Go to the latest build page
- Click on the "Configuration: Release"
- Click on artifacts
- Click on the zip
You may encounter instances where the returned value arrives in the form of ["low":"12321312312,"high":"12312412414","signed":true]. Refer to this issue for instructions on dealing with them.