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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址