From 47ce7cd62c62d476094070e8d833033209c035e1 Mon Sep 17 00:00:00 2001 From: Bambie42 Date: Wed, 26 Aug 2015 14:36:59 +0200 Subject: partly fixes #1756 --- module/plugins/crypter/LinkCryptWs.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index af13f55f6..557a63cbd 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -31,7 +31,6 @@ class LinkCryptWs(Crypter): def setup(self): - self.captcha = False self.links = [] self.sources = ['cnl', 'web', 'dlc', 'rsdf', 'ccf'] @@ -60,7 +59,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() @@ -165,12 +163,11 @@ class LinkCryptWs(Crypter): 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.captcha.invalid() + self.retry() + else: + self.captcha.correct() def handle_link_source(self, type): -- cgit v1.2.3 From 4cd2b7390dd97dc2016ab71f954f191de12f2f46 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 3 Sep 2015 20:37:17 +0200 Subject: Spare fixes (2) --- module/plugins/crypter/LinkCryptWs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 557a63cbd..095ca0158 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -152,7 +152,7 @@ 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 -- cgit v1.2.3 From 9d3d47df1935641fe2bb8771c948b11656133d7c Mon Sep 17 00:00:00 2001 From: Bambie42 Date: Sun, 13 Sep 2015 21:43:20 +0200 Subject: fixes #1756 completly --- module/plugins/crypter/LinkCryptWs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 095ca0158..fdb97ca2c 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.11" __status__ = "testing" __pattern__ = r'http://(?:www\.)?linkcrypt\.ws/(dir|container)/(?P\w+)' @@ -131,11 +131,11 @@ class LinkCryptWs(Crypter): def unlock_captcha_protection(self): captcha_url = re.search(r']*?>.*?<\s*?input.*?src="(.+?)"', self.html, re.I | re.S).group(1) - captcha_code = self.captcha.decrypt(captcha_url, input_type="gif", output_type='positional') + captcha = self.load(captcha_url, decode=False) + captcha_code = self.captcha._decrypt(captcha, input_type="gif", output_type='positional') self.html = self.load(self.pyfile.url, post={'x': captcha_code[0], 'y': captcha_code[1]}) - def get_package_info(self): name = self.pyfile.package().name folder = self.pyfile.package().folder -- cgit v1.2.3 From 36e54a3ee89aafeffdc7eab789502decf11ca2ac Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Sep 2015 02:08:19 +0200 Subject: Update main Captcha plugin --- module/plugins/crypter/LinkCryptWs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index fdb97ca2c..16ee1d4f1 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.11" + __version__ = "0.12" __status__ = "testing" __pattern__ = r'http://(?:www\.)?linkcrypt\.ws/(dir|container)/(?P\w+)' @@ -131,11 +131,11 @@ class LinkCryptWs(Crypter): def unlock_captcha_protection(self): captcha_url = re.search(r']*?>.*?<\s*?input.*?src="(.+?)"', self.html, re.I | re.S).group(1) - captcha = self.load(captcha_url, decode=False) - captcha_code = self.captcha._decrypt(captcha, input_type="gif", output_type='positional') + captcha_code = self.captcha.decrypt(captcha_url, input_type="gif", output_type='positional') self.html = self.load(self.pyfile.url, post={'x': captcha_code[0], 'y': captcha_code[1]}) + def get_package_info(self): name = self.pyfile.package().name folder = self.pyfile.package().folder -- cgit v1.2.3 From f9fc367427e30b7a3ca2ccad6144cb76b21f0257 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 14:36:22 +0200 Subject: Spare code cosmetics --- module/plugins/crypter/LinkCryptWs.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 16ee1d4f1..47ea461f1 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -272,6 +272,7 @@ class LinkCryptWs(Crypter): (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() -- cgit v1.2.3 From 388010d29737128bd47864d11ca7ea296c0fa4f6 Mon Sep 17 00:00:00 2001 From: Gummibaer Date: Tue, 22 Sep 2015 14:41:13 +0200 Subject: Fix for SMOOZED Reload/double-load Page and Smoozed is away --- module/plugins/crypter/LinkCryptWs.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 47ea461f1..0d8590860 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -44,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): -- cgit v1.2.3