From 831a4dbf9d837ec6a463b9112970018dd82d2280 Mon Sep 17 00:00:00 2001 From: HipsterCat Date: Wed, 23 Jan 2019 10:54:51 +0100 Subject: [PATCH] Dynamic packet payloads --- dpnet/netserver.py | 49 +++++++----------------------------------- giants/__init__.py | 35 ++++++++++++++++++++++++++++++ giants/masterserver.py | 9 +++++--- server.py | 4 ++++ 4 files changed, 53 insertions(+), 44 deletions(-) diff --git a/dpnet/netserver.py b/dpnet/netserver.py index da1f6f4..f9565c3 100644 --- a/dpnet/netserver.py +++ b/dpnet/netserver.py @@ -9,6 +9,7 @@ import socket import threading import traceback import uuid +import struct from utils.logger import setup_logger from giants.player import Player @@ -76,7 +77,7 @@ class Netserver: er.ApplicationGUID = eq.ApplicationGUID er.ApplicationReservedData = b'\xff' # Map ID er.ApplicationReservedData += b'\x00\x04\x00' # game type and teams - er.ApplicationReservedData += b'\xd9\x05' # game version + er.ApplicationReservedData += struct.pack("