From 30c5ee2d8d69c59ca15ca1700b34be73a89a59ee Mon Sep 17 00:00:00 2001 From: Gummibaer Date: Sat, 27 Dec 2014 23:32:31 +0100 Subject: Update LinkCryptWs.py key captcha recognition improved (works faster) --- module/plugins/crypter/LinkCryptWs.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 835a549b2..a2afce4dc 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -15,7 +15,7 @@ from module.utils import html_unescape class LinkCryptWs(Crypter): __name__ = "LinkCryptWs" __type__ = "crypter" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'http://(?:www\.)?linkcrypt\.ws/(dir|container)/(?P\w+)' @@ -57,7 +57,7 @@ class LinkCryptWs(Crypter): self.offline() if self.isKeyCaptchaProtected(): - self.retry(4, 30, _("Can't handle Key-Captcha")) + self.retry(8, 15, _("Can't handle Key-Captcha")) if self.isCaptchaProtected(): self.captcha = True @@ -115,10 +115,9 @@ class LinkCryptWs(Crypter): def isKeyCaptchaProtected(self): - if re.search(r'Key[ -]', self.html, re.I): + if(re.search(r'
If the folder does not open after klick on Enter Folder', self.html, re.I)): return True - else: - return False + return False def unlockPasswordProtection(self): -- cgit v1.2.3 From b8ad0c72e6b7b309806be3ea55111b42f733dc9b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 28 Dec 2014 01:38:03 +0100 Subject: [LinkCryptWs] Tiny code cosmetic --- module/plugins/crypter/LinkCryptWs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index a2afce4dc..996a92c7b 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -115,9 +115,10 @@ class LinkCryptWs(Crypter): def isKeyCaptchaProtected(self): - if(re.search(r'
If the folder does not open after klick on Enter Folder', self.html, re.I)): + if re.search(r'>If the folder does not open after klick on <', self.html, re.I): return True - return False + else: + return False def unlockPasswordProtection(self): -- cgit v1.2.3 From e1baccf1ec914563d3b2b845906cce024e7cd3b1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 13 Jan 2015 23:14:50 +0100 Subject: Replace 'except' with 'except Exception' --- 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 996a92c7b..c67372e3d 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -279,7 +279,7 @@ class LinkCryptWs(Crypter): (vcrypted, vjk) = self._getCipherParams(cnl_section) for (crypted, jk) in zip(vcrypted, vjk): package_links.extend(self._getLinks(crypted, jk)) - except: + except Exception: self.logError(_("Unable to decrypt CNL links (JS Error) try to get over links")) return self.handleWebLinks() -- cgit v1.2.3 From 79725268402043906f619f7c09e848e02ab8a17b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 31 Jan 2015 22:00:59 +0100 Subject: Spare code cosmetics --- module/plugins/crypter/LinkCryptWs.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index c67372e3d..098f2542f 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -import base64 import binascii import re @@ -307,14 +306,11 @@ class LinkCryptWs(Crypter): self.logDebug("JsEngine returns value [%s]" % jreturn) - # Decode crypted - crypted = base64.standard_b64decode(crypted) - # Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) - text = obj.decrypt(crypted) + text = obj.decrypt(crypted.decode('base64')) # Extract links text = text.replace("\x00", "").replace("\r", "") -- cgit v1.2.3 From b25bc61dd47d8d3c42969bd0f72443b21c4b059e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 8 Feb 2015 02:09:45 +0100 Subject: Spare code cosmetics --- module/plugins/crypter/LinkCryptWs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 098f2542f..018ed90ba 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -314,8 +314,7 @@ class LinkCryptWs(Crypter): # Extract links text = text.replace("\x00", "").replace("\r", "") - links = text.split("\n") - links = filter(lambda x: x != "", links) + links = filter(bool, text.split('\n')) # Log and return self.logDebug("Package has %d links" % len(links)) -- cgit v1.2.3