summaryrefslogtreecommitdiff
path: root/servergreps/hercules/src
diff options
context:
space:
mode:
Diffstat (limited to 'servergreps/hercules/src')
-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())