idz: Ignore ServerBox traffic

This commit is contained in:
BemaniWitch
2021-02-03 23:43:42 +00:00
committed by Tau
parent 5f708e3372
commit b606af53a1
+6
View File
@@ -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."