signature (aka "unknown6") protobuf builder + encryption for node
currently implemented + working in:
- https://github.com/cyraxx/pogobuf ( ✨
npm install pogobuf)
- https://github.com/Armax/Pokemon-GO-node-api (
npm install pokemon-go-node-api)
As of 0.51 native hashing is currently not supported. This library allows both 0.45 and 0.51.
Upgrading to 0.51
If you already have a working 0.45 implementation, the only changes that you need to make are the below
builderversion = "0.51";builder;
Full working example
This example uses hardcoded buffers. In a real scenario, you would pass your AuthToken and a list of requests. These can be passed in as encoded protocol's or in their unencoded format.
/// ==============================/// 0.51 API/// ==============================/// Your auth ticketconst test = 24;forlet i = 0; i < 24; i++testi = 0;;/// Fake requestconst test2 = 24;forlet i = 0; i < 24; i++test2i = 1;;/// Fake request #2const test3 = 24;forlet i = 0; i < 24; i++test3i = 2;;/// "Unknown22"const bytes = 32;forlet i = 0; i < byteslength; i++bytesi = i;;const builder = unk22: bytes time_since_start: 500 time: 1478434897578 ;builderversion = "0.51";builder;builder;builder;builder;
0.45 (old, unsafe)
The below is for 0.45, which is native (or hash server) hashing. It is no longer considered safe.
use either a hashing server, or native
/// Use hashingutils;builder;/// Do not call this to use native
one-step encrypt usage
If you just want to get stuck in and not worry about setting up your signature, you can use the builder to create everything for you
const builder = ;builder;builder; /* Your location */builder;/* Working example with assertion */const test = 24;forlet i = 0; i < 24; i++testi = 0;;const bytes = 32;forlet i = 0; i < byteslength; i++bytesi = i;;const builder = unk22: bytes time_since_start: 500 time: 1478434897578 ;builder;builder;builder;
timestamp_since_start through the encrypt method found in the native module.
returns (or via callback for async method) the raw encrypted bytes.
input(Buffer): a protobuf-encoded signature message to encrypt
timestamp_since_start(Number): The timestamp since your first request
cb(err, encryptedSignature)(Func): a callback function to execute when encryption by the module has been completed. success when
encryptedSignatureis a buffer containing the encrypted information.
the following will read an input buffer read directly from a file, in the real world this will most likely come from an encoded protobuf structure you generated with your api requests.
var crypto = ;var pogoSignature = ;var dump = fs;var time_since = 500;var encryptedSignature = pogoSignature;console;// or, async w/ a callbackpogoSignature;
- contribute whatever you can
- credit for original
encrypt.cgoes to friends @ /r/pkmngodev (repo is gone)