summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/LinkCryptWs.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter/LinkCryptWs.py')
-rw-r--r--module/plugins/crypter/LinkCryptWs.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py
index af13f55f6..d61c9d3dd 100644
--- a/module/plugins/crypter/LinkCryptWs.py
+++ b/module/plugins/crypter/LinkCryptWs.py
@@ -14,7 +14,7 @@ from module.utils import html_unescape
class LinkCryptWs(Crypter):
__name__ = "LinkCryptWs"
__type__ = "crypter"
- __version__ = "0.10"
+ __version__ = "0.12"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?linkcrypt\.ws/(dir|container)/(?P<ID>\w+)'
@@ -31,7 +31,6 @@ class LinkCryptWs(Crypter):
def setup(self):
- self.captcha = False
self.links = []
self.sources = ['cnl', 'web', 'dlc', 'rsdf', 'ccf']
@@ -45,6 +44,7 @@ class LinkCryptWs(Crypter):
#: Request package
self.req.http.c.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko") #: Better chance to not get those key-captchas
self.html = self.load(self.pyfile.url)
+ self.html = self.load(self.pyfile.url)
def decrypt(self, pyfile):
@@ -60,7 +60,6 @@ class LinkCryptWs(Crypter):
self.retry(8, 15, _("Can't handle Key-Captcha"))
if self.is_captcha_protected():
- self.captcha = True
self.unlock_captcha_protection()
self.handle_captcha_errors()
@@ -154,23 +153,21 @@ class LinkCryptWs(Crypter):
unrarpw = sitein[indexi:indexe]
- if not (unrarpw == "Password" or "Dateipasswort") :
+ if unrarpw not in ("Password", "Dateipasswort"):
self.log_debug("File password set to: [%s]"% unrarpw)
self.pyfile.package().password = unrarpw
def handle_errors(self):
if self.is_password_protected():
- self.fail(_("Incorrect password"))
+ self.fail(_("Wrong password"))
def handle_captcha_errors(self):
- if self.captcha:
- if "Your choice was wrong!" in self.html:
- self.captcha.invalid()
- self.retry()
- else:
- self.captcha.correct()
+ if "Your choice was wrong" in self.html:
+ self.retry_captcha()
+ else:
+ self.captcha.correct()
def handle_link_source(self, type):
@@ -246,7 +243,7 @@ class LinkCryptWs(Crypter):
if not clink:
continue
- self.log_debug("clink avaible")
+ self.log_debug("clink found")
package_name, folder_name = self.get_package_info()
self.log_debug("Added package with name %s.%s and container link %s" %( package_name, type, clink.group(1)))
@@ -268,13 +265,14 @@ class LinkCryptWs(Crypter):
break
if cnl_line:
- self.log_debug("cnl_line gefunden")
+ self.log_debug("cnl_line found")
try:
cnl_section = self.handle_javascript(cnl_line)
(vcrypted, vjk) = self._get_cipher_params(cnl_section)
for (crypted, jk) in zip(vcrypted, vjk):
package_links.extend(self._get_links(crypted, jk))
+
except Exception:
self.log_error(_("Unable to decrypt CNL links (JS Error) try to get over links"))
return self.handle_web_links()