summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-05 20:16:07 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-05 20:27:12 +0300
commit51534b3a887489f58b643e3399f6d2a6912d6422 (patch)
tree9802dba20a5ff441e19041e080ab4325714439b5
parenteaf5b5bbc1fa5692e94de35d525970dfb0a3747c (diff)
downloadevol-tools-51534b3a887489f58b643e3399f6d2a6912d6422.tar.gz
evol-tools-51534b3a887489f58b643e3399f6d2a6912d6422.tar.bz2
evol-tools-51534b3a887489f58b643e3399f6d2a6912d6422.tar.xz
evol-tools-51534b3a887489f58b643e3399f6d2a6912d6422.zip
servergreps: not log inter server packets.
-rwxr-xr-xservergreps/hercules/src/hercules.py7
-rwxr-xr-xservergreps/hercules/src/rathena.py9
2 files changed, 16 insertions, 0 deletions
diff --git a/servergreps/hercules/src/hercules.py b/servergreps/hercules/src/hercules.py
index c4fcf42..fdee363 100755
--- a/servergreps/hercules/src/hercules.py
+++ b/servergreps/hercules/src/hercules.py
@@ -58,8 +58,15 @@ class Hercules:
def addServerPacket(self, data):
if data in self.namedPackets:
for val in self.namedPackets[data]:
+ if int(val, 16) > 4096:
+ return
self.packetsSet.add(val)
else:
+ try:
+ if int(data, 16) > 4096:
+ return
+ except:
+ pass
self.packetsSet.add(data.lower())
diff --git a/servergreps/hercules/src/rathena.py b/servergreps/hercules/src/rathena.py
index b9f8925..ec71d5b 100755
--- a/servergreps/hercules/src/rathena.py
+++ b/servergreps/hercules/src/rathena.py
@@ -57,10 +57,19 @@ class Rathena:
def addServerPacket(self, data):
+ if data == "cmde":
+ return
if data in self.namedPackets:
for val in self.namedPackets[data]:
+ if int(val, 16) > 4096:
+ return
self.packetsSet.add(val)
else:
+ try:
+ if int(data, 16) > 4096:
+ return
+ except:
+ pass
self.packetsSet.add(data.lower())