summaryrefslogtreecommitdiffstats
path: root/module/remote
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-29 20:47:03 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-29 20:47:03 +0200
commitca1c034012f15fcebf1cf918f578afbcfe028ea7 (patch)
tree16e4f590aed0fe5498add0bb880bd4367eaffdbd /module/remote
parentrequestobject and working interface to the core (diff)
downloadpyload-ca1c034012f15fcebf1cf918f578afbcfe028ea7.tar.xz
little request fix
Diffstat (limited to 'module/remote')
-rw-r--r--module/remote/RequestHandler.py14
-rw-r--r--module/remote/RequestObject.py2
2 files changed, 10 insertions, 6 deletions
diff --git a/module/remote/RequestHandler.py b/module/remote/RequestHandler.py
index 09ad5b548..1405fd3eb 100644
--- a/module/remote/RequestHandler.py
+++ b/module/remote/RequestHandler.py
@@ -30,7 +30,7 @@ class RequestHandler:
if obj.command == "exec":
func = getattr(self.core, obj.function)
- obj.response = func()
+ obj.response = func(*obj.args)
else:
obj.response = "antwort"
@@ -38,11 +38,15 @@ class RequestHandler:
def decrypt(self, dec_str):
- dec_str = base64.standard_b64decode(dec_str)
- dec_str = self.aes.decrypt(dec_str)
+ try:
+ dec_str = base64.standard_b64decode(dec_str)
+ dec_str = self.aes.decrypt(dec_str)
- dec_str = dec_str[:-(int(dec_str[-1], 16) + 1)]
- obj = cPickle.loads(dec_str)
+ dec_str = dec_str[:-(int(dec_str[-1], 16) + 1)]
+ obj = cPickle.loads(dec_str)
+ except:
+ obj = RequestObject()
+
return obj
def encrypt(self, obj):
diff --git a/module/remote/RequestObject.py b/module/remote/RequestObject.py
index 77322663a..86e803e9c 100644
--- a/module/remote/RequestObject.py
+++ b/module/remote/RequestObject.py
@@ -3,7 +3,7 @@
"""
authored by: RaNaN
-this module handels the incoming requests
+represents the object for interaction
"""