INNER CODE UNIT · Python
challengeresponse
tx00100xt/SeriousSamClassic-VK · SamTSE/GameAgent/server.py:18
def challengeresponse(self, data):
params = re.findall(";(\w+);([^;]*)", data)
valid = False
for param in params:
key = param[0]
val = param[1]
if(key == "challenge"):
if(val == str(self.challenge)):
valid = True
continue
if(key == "product"):
self.product = val
continue
try:
self.paramsallowed.split(";").index(key)
self.params[key] = val
except:
pass