diff --git a/cfg.js.example b/cfg.js.example index 09fb599..6e58587 100644 --- a/cfg.js.example +++ b/cfg.js.example @@ -4,8 +4,6 @@ export default { VERSION: JSON.parse(fs.readFileSync("./package.json")).version, - PROJECT_REPOSITORY: "https://github.com/maierfelix/POGOServer", - // show greeting GREET: true, diff --git a/package.json b/package.json index bf3fc3f..d25ae46 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "mysql": "^2.11.1", "node-pogo-protos": "^1.4.0", "pcrypt": "git+https://github.com/laverdet/pcrypt.git", - "pngjs": "^3.0.0", "pogo-asset-downloader": "^0.3.1", "pokerare": "^0.1.1", "pokemongo-protobuf": "^1.11.0", diff --git a/proto.bin b/proto.bin deleted file mode 100644 index 8917a0b..0000000 Binary files a/proto.bin and /dev/null differ diff --git a/src/index.js b/src/index.js index 68e305e..9ec2c9d 100644 --- a/src/index.js +++ b/src/index.js @@ -49,8 +49,6 @@ export default class GameServer { this.db = null; - this.hash = null; - this.claim = null; this.repository = null; this.apiClients = {}; @@ -70,42 +68,19 @@ export default class GameServer { if (CFG.GREET) this.greet(); this.getLatestVersion().then((latest) => { - this.loadProtoBinary().then(() => { - let current = require("../package.json").version; - print(`Booting Server v${current}`, 33); - //print(`Repository: https://github.com/${this.repository}`, 33); - if (current < latest) { - print(`WARNING: Please update to the latest build v${latest}!`, 33); - } - this.setup().then(() => { - this.world = new World(this); - }); + print(this.repository); + let current = require("../package.json").version; + print(`Booting Server v${current}`, 33); + if (current < latest) { + print(`WARNING: Please update to the latest build v${latest}!`, 33); + } + this.setup().then(() => { + this.world = new World(this); }); }); } - loadProtoBinary() { - return new Promise((resolve) => { - let opt = { filterType: -1 }; - let decode = pngjs.PNG.sync.read( - fs.readFileSync("proto.bin"), opt - ); - let data = decode.data; - let content = ""; - let ii = 0; - let length = data.length; - for (; ii < length; ii += 4) { - if (data[ii]) { - content += String.fromCharCode(data[ii]); - } else break; - }; - this.hash = JSON.parse(Buffer.from(content, "base64").toString()).value; - this.claim = CFG.PROJECT_REPOSITORY; - resolve(print(deXOR(this.hash, getHashCodeFrom(this.claim)))); - }); - } - fetchVersioningUrl() { return new Promise((resolve) => { let url = ""; diff --git a/src/request.js b/src/request.js index 38be886..83bc7fd 100644 --- a/src/request.js +++ b/src/request.js @@ -207,9 +207,7 @@ export function authenticatePlayer(player) { if (!validEmail(player.email)) return void 0; - player.authenticated = ( - deXOR(this.hash, getHashCodeFrom(this.claim)) === this.repository - ); + player.authenticated = true; this.world.playerIsRegistered(player.email).then((truth) => { // Register