Tried many values and found gametype and teams bytes
This commit is contained in:
parent
d46598ae5e
commit
3fd1ea47b3
@ -244,51 +244,89 @@ class Netserver:
|
||||
payload.putLong(0x00) # unknown
|
||||
payload.putLong(0x50) # unknown - 80
|
||||
payload.putLong(0x41) # unknown - 65
|
||||
payload.putLong(0x14) # max players
|
||||
payload.putLong(0x02) # current players
|
||||
payload.putLong(self.server.maxplayers) # max players
|
||||
payload.putLong(len(self.server.players)) # current players
|
||||
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.write(b'\x01\x00\x00') # original: 010000 - client does not connect if wrong
|
||||
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 that's an offset FUN FACT: setting it to a bad value makes the client crash on connect
|
||||
payload.putLong(0x34) # unknown - 52
|
||||
payload.putLong(0x12) # original: 0x34 - does not seem to affect the client
|
||||
payload.write(self.guid) # instance guid
|
||||
payload.write(
|
||||
b"\x10\x5e\x62\xa7\x96\x1a\xd2\x11\x9a\xfc\x00\x60\x08\x45\xe5\x71") # app guid
|
||||
payload.write(b'\x40\xf5\x62\xe1')
|
||||
payload.putLong(0x21) # unknown - 33
|
||||
payload.write(b'\x40\xf5\x62\xe1') # original: 40f562e1 - client does not connect if wrong
|
||||
payload.putLong(0x10) # original: 0x21 - does not seem to affect the client
|
||||
payload.putLong(0x00) # unknown
|
||||
payload.putLong(0x02) # unknown - 2
|
||||
payload.putLong(0x00) # original: 0x00
|
||||
payload.write(b'\x01\x01\x01\x01') # original: 45f552e3 - does not seem to affect the client
|
||||
payload.putLong(0x00)
|
||||
payload.write(b'\x45\xf5\x52\xe3')
|
||||
payload.putLong(0x00)
|
||||
payload.write(b'\x02\x04\x00\x00') # unknown
|
||||
payload.putLong(0x02) # unknown - 2
|
||||
payload.write(b'\x02\x04\x00\x00') # original: 02040000 - client does not connect if wrong
|
||||
payload.putLong(0x02) # original: 0x02 - client does not connect if wrong
|
||||
payload.putLong(0x00) # unknown
|
||||
payload.putLong(0x07) # unknown - 7
|
||||
payload.putLong(0x07) # original: 0x07 unknown - 7
|
||||
for _ in range(6):
|
||||
payload.putLong(0) # unknown
|
||||
payload.write(b'\x40\xf5\x62\xe1') # unknown - 1089823457
|
||||
payload.write(b'\x40\xf5\x62\xe1') # original: 40f562e1 - client does not connect if wrong
|
||||
payload.putLong(0x00) # unknown
|
||||
payload.write(b'\x00\x02\x00\x00') # unknown - ?
|
||||
payload.putLong(0x21) # unknown - 33
|
||||
payload.putLong(0x21) # original: 0x21 unknown - 33
|
||||
payload.putLong(0x00) # unknown - 0
|
||||
payload.putLong(0x07) # unknown - 7
|
||||
payload.putLong(0xcc) # unknown - 204
|
||||
payload.putLong(0x07) # original: 0x07 unknown - 7
|
||||
payload.putLong(0xcc) # original: 0xcc - does not seem to affect client
|
||||
payload.putLong(len((name + "\x00").encode("utf-16-le"))) # player name length
|
||||
for _ in range(4):
|
||||
payload.putLong(0) # unknown
|
||||
payload.write((name + "\x00").encode("utf-16-le"))
|
||||
payload.write(b'\xff') # map ID
|
||||
payload.write(b'\x01\x01\x00')
|
||||
payload.write(b'\x08') # game type
|
||||
# 00: Team Deathmatch
|
||||
# 01: Team Deathmatch with full base
|
||||
# 02: Capture Smartie
|
||||
# 03: Capture Smartie with full base
|
||||
# 04: Base Build Deathmatch
|
||||
# 05: Base Build and Capture the Smartie
|
||||
# 06: Defend Base
|
||||
# 07: Defend Base and Capture the Smartie
|
||||
# 08: GTypeStone
|
||||
# 09: GTypeWood
|
||||
# 0a: crash to desktop
|
||||
# 0b: crash to desktop
|
||||
# 0c: GType(null)
|
||||
# 0d: crash to desktop
|
||||
# 0e: crash to desktop
|
||||
# 0f: crash to desktop
|
||||
# 10: crash to desktop
|
||||
# feel free to try other values...
|
||||
# aa: crash to desktop
|
||||
# ff: crash to desktop
|
||||
|
||||
payload.write(b'\x00') # teams
|
||||
# 00: MvM
|
||||
# 01: MvMvM
|
||||
# 02: RvR
|
||||
# 03: MvR
|
||||
# 04: MvRvK
|
||||
# 05: MvK
|
||||
# 06: RvK
|
||||
# 07: ? Team B
|
||||
# 08: ? Team B
|
||||
# feel free to try other values...
|
||||
# 10: ? Team B
|
||||
# 0c: ? Team B
|
||||
# 5a: crash to desktop
|
||||
payload.write(b'\xcc') # original: 0x00 - does not seem to affect client
|
||||
payload.write(b'\xd9\x05') # game version
|
||||
payload.write(b'\x02\x92') # unknown
|
||||
payload.write(b'\x05\x00\x01\x00\x00\x00\x00\x00') # Unknown
|
||||
payload.write(b'\x03\x90') # original: 0292 - does not seem to affect client
|
||||
payload.write(b'\x05\x00') # points per capture
|
||||
payload.write(b'\x01\x00') # points per kill
|
||||
payload.write(b'\xff\xff') # original: 0000 - does not seem to affect client
|
||||
payload.write(b'\x00\x00') # détente time
|
||||
payload.write(b'\x9c\x53\xf4\xdf') # Seems to be a checksum of current map OR linked to the number of chars in the map name
|
||||
payload.write(self.server.currentmap.mapname.encode("ascii"))
|
||||
payload.write(b'\x00' * (32 - len(self.server.currentmap.mapname)))
|
||||
#payload.putLong(0x00) # ??
|
||||
payload.write((self.server.name + "\x00").encode("utf-16-le"))
|
||||
|
||||
r.Payload = payload.getvalue()
|
||||
|
Loading…
Reference in New Issue
Block a user