hearthstone-capture

command module
v0.0.0-...-59ee2ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2016 License: MIT Imports: 12 Imported by: 0

README

hearthstone-capture

Stream Hearthstone PegasusPackets to stdout

Install

Requires golang

git clone https://github.com/jshrake/hearthstone-db
cd hearthstone-db
make install

Usage

Requires privledge escalation for packet capturing:

[sudo] hearthstone-capture [-snaplen=1600 -filter="tcp port 3724 or tcp port 1119"]

PegasusPacket format

struct PegasusPacket {
	uint32_t type;
	uint32_t size;
	uint8_t *message;
};

The decompiled protocol buffer message definitions can be found at HearthSim/hs-proto. Of particular interest are the messages defined in PegasusGame.

The PegausPacket type corresponds to the message PacketID. For instance, a PegasusPacket type of 19 corresponds to a PowerHistory message.

Here's a handcrafted map from type to message name to get you started:

{
	"1": "GetGameState",
	"2": "ChooseOption",
	"3": "ChooseEntities",
	"11": "Concede",
	"13": "EntitiesChosen",
	"14": "AllOptions",
	"15": "UserUI",
	"16": "GameSetup",
	"17": "EntityChoices",
	"19": "PowerHistory",
	"24": "SpectatorNotify",
	"115": "Ping",
	"116": "Pong",
	"168": "Handshake"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL