Skip to content

Commit

Permalink
Add simple sniff program
Browse files Browse the repository at this point in the history
Uses the (rust wrapper) of the official Discord Game SDK to both sniff
the traffic between the SDK and the Discord app, but also just test to
see if bugs are caused by Discord itself rather than our implementation
  • Loading branch information
Jake-Shadle committed Jun 16, 2021
1 parent 0ebd1cd commit ec9860e
Show file tree
Hide file tree
Showing 10 changed files with 1,271 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/target
sniff/target
**/*.rs.bk
Cargo.lock

.idea
.DS_Store
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ repository = "https://github.com/EmbarkStudios/discord-sdk"
keywords = ["discord", "games"]
readme = "README.md"

exclude = [
"sniff",
]

[features]
# Enables tests that require 2 running Discord applications (stable, canary, or PTB)
# with a logged in user, see https://discord.com/developers/docs/game-sdk/sdk-starter-guide#testing-locally-with-two-clients
Expand Down
6 changes: 6 additions & 0 deletions run-sniff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

LD_LIBRARY_PATH=$(realpath ./sniff/lib/x86_64) \
DISCORD_GAME_SDK_PATH=$(realpath ./sniff) \
cargo run --manifest-path sniff/Cargo.toml
9 changes: 9 additions & 0 deletions sniff/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "sniff"
version = "0.1.0"
authors = ["Jake Shadle <[email protected]>"]
edition = "2018"

[dependencies]
discord_game_sdk = "1.0"
structopt = "0.3"
Loading

0 comments on commit ec9860e

Please sign in to comment.