summaryrefslogtreecommitdiffstats
path: root/pyload/webui
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/webui')
-rw-r--r--pyload/webui/__init__.py8
-rw-r--r--pyload/webui/app/cnl.py10
2 files changed, 6 insertions, 12 deletions
diff --git a/pyload/webui/__init__.py b/pyload/webui/__init__.py
index a0e849a11..e1fe6738f 100644
--- a/pyload/webui/__init__.py
+++ b/pyload/webui/__init__.py
@@ -107,13 +107,13 @@ def run_lightweight(host="0.0.0.0", port="8000"):
def run_threaded(host="0.0.0.0", port="8000", theads=3, cert="", key=""):
- from wsgiserver import CherryPyWSGIServer
+ import wsgiserver
if cert and key:
- CherryPyWSGIServer.ssl_certificate = cert
- CherryPyWSGIServer.ssl_private_key = key
+ wsgiserver.CherryPyWSGIServer.ssl_certificate = cert
+ wsgiserver.CherryPyWSGIServer.ssl_private_key = key
- CherryPyWSGIServer.numthreads = theads
+ wsgiserver.CherryPyWSGIServer.numthreads = theads
from pyload.webui.app.utils import CherryPyWSGI
diff --git a/pyload/webui/app/cnl.py b/pyload/webui/app/cnl.py
index 465e087e5..07b966f5e 100644
--- a/pyload/webui/app/cnl.py
+++ b/pyload/webui/app/cnl.py
@@ -8,20 +8,14 @@ import os
import re
import urllib
+import Crypto
import bottle
from pyload.webui import PYLOAD, DL_ROOT, JS
-try:
- from Crypto.Cipher import AES
-except Exception:
- pass
-
-
def local_check(function):
-
def _view(*args, **kwargs):
if request.environ.get("REMOTE_ADDR", "0") in ("127.0.0.1", "localhost") \
or request.environ.get("HTTP_HOST", "0") in ("127.0.0.1:9666", "localhost:9666"):
@@ -105,7 +99,7 @@ def addcrypted2():
IV = Key
- obj = AES.new(Key, AES.MODE_CBC, IV)
+ obj = Crypto.Cipher.AES.new(Key, Crypto.Cipher.AES.MODE_CBC, IV)
result = obj.decrypt(crypted).replace("\x00", "").replace("\r", "").split("\n")
result = filter(lambda x: x != "", result)