summaryrefslogtreecommitdiff
path: root/servergreps
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-06 23:20:07 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-06 23:20:07 +0300
commited14e17c2433c37d992542c38a93ba9b233e4d4a (patch)
treed3247e8e07d7e37ad39349686f59f55454e9023e /servergreps
parentc03dbcebb3c96b6ee5909e1bbe18c4d6b5162e31 (diff)
downloadtools-ed14e17c2433c37d992542c38a93ba9b233e4d4a.tar.gz
tools-ed14e17c2433c37d992542c38a93ba9b233e4d4a.tar.bz2
tools-ed14e17c2433c37d992542c38a93ba9b233e4d4a.tar.xz
tools-ed14e17c2433c37d992542c38a93ba9b233e4d4a.zip
servergreps: Fix some issues in packet checks
Diffstat (limited to 'servergreps')
-rwxr-xr-xservergreps/hercules/packets.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/servergreps/hercules/packets.py b/servergreps/hercules/packets.py
index f3d0e0b..85e4b43 100755
--- a/servergreps/hercules/packets.py
+++ b/servergreps/hercules/packets.py
@@ -134,7 +134,8 @@ def collectManaPlusOutPackets(fileName, packetVersion):
continue
clientPacketsManaPlus[m.group("packet").lower()] = (m.group("name"), int(m.group("len")), m.group("function"))
clientPacketsManaPlusClient[m.group("packet").lower()] = (m.group("name"), int(m.group("len")), m.group("function"))
- outMsgNameToId[m.group("name")] = m.group("packet").lower()
+ outMsgNameToId[m.group("name").strip()] = m.group("packet").lower()
+ #print "{0} = {1}".format(m.group("name").strip(), m.group("packet").lower())
def collectClientPackets(fileName):
with open(fileName, "r") as f:
@@ -284,7 +285,9 @@ def printPackets(packetDir):
rev = []
with open(packetDir + "/clientwrongpacketsizes.txt", "w") as w:
- for packet in clientPacketsManaPlusClient:
+ for name in outMsgNameToId:
+ packet = outMsgNameToId[name]
+# for packet in clientPacketsManaPlusClient:
if packet in clientPackets and clientPacketsManaPlusClient[packet][1] != clientPackets[packet][0]:
packet1 = clientPacketsManaPlusClient[packet]
packet2 = clientPackets[packet]
@@ -301,7 +304,9 @@ def printPackets(packetDir):
rev = []
with open(packetDir + "/clientbadpackets.txt", "w") as w:
- for packet in clientPacketsManaPlusClient:
+ for name in outMsgNameToId:
+ packet = outMsgNameToId[name]
+# for packet in clientPacketsManaPlusClient:
if packet in clientPackets:
packet1 = clientPacketsManaPlusClient[packet]
packet2 = clientPackets[packet]