Decrypt entire command in gamestats

Previously it would decrypt by packet, now it will wait for the entire
packet before trying to decrypt. This fixes games like Mega Man Star
Force.
This commit is contained in:
polaris 2014-06-05 04:07:59 -04:00
parent 000f3170e1
commit e661fa7466

View File

@ -103,8 +103,14 @@ class Gamestats(LineReceiver):
def rawDataReceived(self, data):
try:
# Decrypt packet
msg = self.remaining_message + str(self.crypt(data))
self.remaining_message += data
if "\\final\\" not in data:
return
msg = str(self.crypt(self.remaining_message))
self.data = msg
self.remaining_message = ""
commands, self.remaining_message = gs_query.parse_gamespy_message(msg)
logger.log(logging.DEBUG, "STATS RESPONSE: %s" % msg)