From 789c97f3ff257c3b40743cae48a37b20c2e687a5 Mon Sep 17 00:00:00 2001 From: Matthew Ray Date: Sun, 17 May 2020 06:55:07 -0400 Subject: [PATCH] various additions --- src/cscli/main.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cscli/main.ts b/src/cscli/main.ts index e84413c..5de963c 100644 --- a/src/cscli/main.ts +++ b/src/cscli/main.ts @@ -29,14 +29,13 @@ export default class CSCLI { } public async handle(socket: net.Socket, data: Buffer) { - console.log(data.toString().trim()); const args = data.toString().trim().split('$'); const verification = this.verifyConnection(args[1], args[0]); if (!verification) { socket.write('UNAUTHORIZED TO EXECUTE ON THIS SERVER\n'); return socket.destroy(); } - const parsed: { Username: string, Type: string, Message?: string, HMAC: string } = JSON.parse(args[1]); + const parsed: { Username: string, Type: string, Message?: string, HMAC: string } = JSON.parse(args[0]); // FINISH VERIFICATION CHECKS switch (parsed.Type) { case 'lock': @@ -63,7 +62,6 @@ export default class CSCLI { const hmac = crypto.createHmac('sha256', this.#hmac); hmac.update(data); const computed = hmac.digest('hex'); - console.log(computed); if (computed === key) return true; return false; }