Match the length of some things to the real server's.

This commit is contained in:
Admiral H. Curtiss
2014-05-27 04:00:39 +02:00
parent 2b9582d981
commit e7837fbd4d
2 changed files with 4 additions and 2 deletions

View File

@@ -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 = ?"

View File

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