From b606af53a16f8f50e067adf60a2a3d841496df34 Mon Sep 17 00:00:00 2001 From: BemaniWitch Date: Wed, 3 Feb 2021 17:02:14 -0500 Subject: [PATCH] idz: Ignore ServerBox traffic --- src/idz/common/setup.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/idz/common/setup.ts b/src/idz/common/setup.ts index 0d02d3d..f56be4a 100644 --- a/src/idz/common/setup.ts +++ b/src/idz/common/setup.ts @@ -48,6 +48,12 @@ function writeServerHello(aesKey: Buffer, rsaKey: RsaKey): Buffer { function readClientHello(buf: Buffer) { const magic = buf.readUInt32LE(0x00); + if (magic === 0xFE78571D) { + throw new Error( + "Server Box data, ignore." + ); + } + if (magic !== 0x01020304) { throw new Error( "Invalid magic number, cryptographic processing probably incorrect."