diff options
author | Armin <Armin@Armin-PC.diedering.lan> | 2015-04-20 22:54:24 +0200 |
---|---|---|
committer | Armin <Armin@Armin-PC.diedering.lan> | 2015-04-20 22:54:24 +0200 |
commit | 2b0775c5b53788abe60bce164b5accdfdfec29ac (patch) | |
tree | e1a331e862864b07170428f2f5b454f3841db03d | |
parent | Improve getClassName (diff) | |
download | pyload-2b0775c5b53788abe60bce164b5accdfdfec29ac.tar.xz |
added check of classname == filename
-rw-r--r-- | pyload/manager/Plugin.py | 3 | ||||
-rw-r--r-- | pyload/plugin/hook/Captcha9Kw.py | 26 |
2 files changed, 16 insertions, 13 deletions
diff --git a/pyload/manager/Plugin.py b/pyload/manager/Plugin.py index a081a643e..bcaf06bde 100644 --- a/pyload/manager/Plugin.py +++ b/pyload/manager/Plugin.py @@ -110,6 +110,9 @@ class PluginManager(object): if name[-1] == ".": name = name[:-4] + if not re.search("class\\s+%s\\(" % name, content): + self.core.log.error(_("invalid classname: %s ignored") % join(pfolder, f)) + version = self.VERSION.findall(content) if version: version = float(version[0][1]) diff --git a/pyload/plugin/hook/Captcha9Kw.py b/pyload/plugin/hook/Captcha9Kw.py index bbf283623..9ceab4b2b 100644 --- a/pyload/plugin/hook/Captcha9Kw.py +++ b/pyload/plugin/hook/Captcha9Kw.py @@ -13,27 +13,27 @@ from pyload.network.RequestFactory import getURL from pyload.plugin.Hook import Hook, threaded -class Captcha9kw(Hook): +class Captcha9Kw(Hook): __name = "Captcha9Kw" __type = "hook" __version = "0.28" - __config = [("ssl" , "bool" , "Use HTTPS" , True ), - ("force" , "bool" , "Force captcha resolving even if client is connected" , True ), - ("confirm" , "bool" , "Confirm Captcha (cost +6 credits)" , False ), - ("captchaperhour", "int" , "Captcha per hour" , "9999" ), - ("captchapermin" , "int" , "Captcha per minute" , "9999" ), - ("prio" , "int" , "Priority (max 10)(cost +0 -> +10 credits)" , "0" ), - ("queue" , "int" , "Max. Queue (max 999)" , "50" ), + __config = [("ssl" , "bool" , "Use HTTPS" , True), + ("force" , "bool" , "Force captcha resolving even if client is connected" , True), + ("confirm" , "bool" , "Confirm Captcha (cost +6 credits)" , False), + ("captchaperhour", "int" , "Captcha per hour" , "9999"), + ("captchapermin" , "int" , "Captcha per minute" , "9999"), + ("prio" , "int" , "Priority (max 10)(cost +0 -> +10 credits)" , "0"), + ("queue" , "int" , "Max. Queue (max 999)" , "50"), ("hoster_options", "string" , "Hoster options (format: pluginname:prio=1:selfsolfe=1:confirm=1:timeout=900|...)", "ShareonlineBiz:prio=0:timeout=999 | UploadedTo:prio=0:timeout=999"), - ("selfsolve" , "bool" , "Selfsolve (manually solve your captcha in your 9kw client if active)" , "0" ), - ("passkey" , "password", "API key" , "" ), - ("timeout" , "int" , "Timeout in seconds (min 60, max 3999)" , "900" )] + ("selfsolve" , "bool" , "Selfsolve (manually solve your captcha in your 9kw client if active)" , "0"), + ("passkey" , "password", "API key" , ""), + ("timeout" , "int" , "Timeout in seconds (min 60, max 3999)" , "900")] __description = """Send captchas to 9kw.eu""" __license = "GPLv3" - __authors = [("RaNaN" , "RaNaN@pyload.org" ), - ("Walter Purcaro", "vuolter@gmail.com")] + __authors = [("RaNaN" , "RaNaN@pyload.org"), + ("Walter Purcaro", "vuolter@gmail.com")] API_URL = "http://www.9kw.eu/index.cgi" |