Skip to content

Commit 7b5bfb3

Browse files
committed
examples: link to encrypted-net-messages
1 parent a9e6ec8 commit 7b5bfb3

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Here you can find a overview of examples on how to use demoinfocs-golang.
88
|[nade-trajectories](nade-trajectories)|Map overview with grenade trajectories|
99
|[entities](entities)|Using unhandled data from entities (`Parser.ServerClasses()`)|
1010
|[net-messages](net-messages)|Parsing and handling custom net-messages|
11+
|[encrypted-net-messages](encrypted-net-messages)|Parsing and handling encrypted net-messages (e.g. text chat in MM demos)|
1112
|[print-events](print-events)|Printing kills, scores & chat messages|
1213
|[mocking](mocking)|Using the `fake` package to write unit tests for your code|
1314
|[web-assembly](web-assembly)|Using the library from JavaScript (browser/node) with [WebAssembly](https://webassembly.org/)|
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Parsing & handling encrypted net-messages
2+
3+
See also [../net-messages](net-messages) for regular net-messages.
4+
5+
This example shows how to have the parser deal with encrypted net-messages.
6+
7+
For Valve MM games, the decryption key can be obtained from `.dem.info` files using `MatchInfoDecryptionKey()`.
8+
The key then needs to be passed to `ParserConfig.NetMessageDecryptionKey`.
9+
10+
## Run
11+
12+
go run enc_net_nsg.go -demo path/to/demo.dem -info path/to/demo.dem.info
13+
14+
This prints chat messages from the passed demo (assuming the `.dem.info` file contains the correct decryption key).

0 commit comments

Comments
 (0)