From 206d12742a9a86d0df5d77710d89cf771c51c48b Mon Sep 17 00:00:00 2001 From: b166fe48b91eb09f279b79a4ecf57b2f8f0d3705 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."