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 = []