pogo-decode
v0.5.2
Published
Pokemon GO traffic decoder
Downloads
9
Maintainers
Readme
POGOdecode
Decode Pokemon GO requests with their equivalent responses.
Install
$ npm install --save pogo-decode
Usage
var fs = require("fs");
var decode = require("../index.js");
// both raw pokemon go traffic dumps
var req = fs.readFileSync("0_req.dump");
var res = fs.readFileSync("0_res.dump");
var options = {
decodeLongs: true,
removeNulls: true
};
var output = decode(req, res, options); // returns decoded request and response
API
decode(request, response, options)
| Parameter | Type | Description |-----------------|-----------------|--------------- | request | Buffer | Request buffer | response | Buffer | Response buffer | options | object | Options | @returns | object | Corresponding output
Options
| Parameter | Type | Description |-----------------|-----------------|--------------- | decodeLong | boolean | Automatically decode longs | removeNulls | boolean | Remove all null keys | encodeBuffers | boolean | Encode buffers to binary