From d46598ae5e922e1627031a4f658786edbf1ebfbd Mon Sep 17 00:00:00 2001 From: HipsterCat Date: Tue, 22 Jan 2019 15:25:09 +0100 Subject: [PATCH] Moved fun fact to the right value --- dpnet/netserver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dpnet/netserver.py b/dpnet/netserver.py index ee054a9..082f7bb 100644 --- a/dpnet/netserver.py +++ b/dpnet/netserver.py @@ -246,12 +246,12 @@ class Netserver: payload.putLong(0x41) # unknown - 65 payload.putLong(0x14) # max players payload.putLong(0x02) # current players - payload.putByte(len((name + "\x00").encode("utf-16-le"))) # player name length FUN FACT: setting it to a bad value makes the client crash on connect + payload.putByte(len((name + "\x00").encode("utf-16-le"))) # player name length payload.write(b'\x01\x00\x00') # unknown - 3585 - or \x16\x01\x00\x00 payload.putLong(len((self.server.name + "\x00").encode("utf-16-le"))) # SERVERNAME LENGTH for _ in range(4): payload.putLong(0) # unknown - payload.putLong(204+len((name+"\x00").encode("utf-16-le"))) # 204+playerlen + payload.putLong(204+len((name+"\x00").encode("utf-16-le"))) # 204+playerlen that's an offset FUN FACT: setting it to a bad value makes the client crash on connect payload.putLong(0x34) # unknown - 52 payload.write(self.guid) # instance guid payload.write(