From e7837fbd4d33f036e4f945c6a1417059ba1f7356 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Tue, 27 May 2014 04:00:39 +0200 Subject: [PATCH] Match the length of some things to the real server's. --- gamespy/gs_database.py | 4 +++- gamespy_profile_server.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gamespy/gs_database.py b/gamespy/gs_database.py index 8ea0875..a83931a 100644 --- a/gamespy/gs_database.py +++ b/gamespy/gs_database.py @@ -405,7 +405,9 @@ class GamespyDatabase(object): def generate_authtoken(self, userid, data): # Since the auth token passed back to the game will be random, we can make it small enough that there # should never be a crash due to the size of the token. - size = 16 + # ^ real authtoken is 80 + 3 bytes though and I want to figure out what's causing the 52200 + # so I'm matching everything as closely as possible to the real thing + size = 80 authtoken = "NDS" + utils.generate_random_str(size) q = "SELECT authtoken FROM nas_logins WHERE authtoken = ?" diff --git a/gamespy_profile_server.py b/gamespy_profile_server.py index 8b6ffe7..c619dca 100644 --- a/gamespy_profile_server.py +++ b/gamespy_profile_server.py @@ -97,7 +97,7 @@ class PlayerSession(LineReceiver): self.session = "" # Generate a random challenge string - self.challenge = utils.generate_random_str(8, "ABCDEFGHIJKLMNOPQRSTUVWXYZ") + self.challenge = utils.generate_random_str(10, "ABCDEFGHIJKLMNOPQRSTUVWXYZ") # The first command sent to the client is always a login challenge containing the server challenge key. msg_d = []