From 0e1ef9bc01579328e17e79416fa3c1c7b77adcc8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 06:08:01 +0200 Subject: Update everything --- module/plugins/crypter/FilecryptCc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 4d2b42f90..2271a7b6d 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -9,14 +9,14 @@ import urlparse from Crypto.Cipher import AES -from module.plugins.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter from module.plugins.internal.ReCaptcha import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' -- cgit v1.2.3 From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/crypter/FilecryptCc.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 2271a7b6d..7ca5659fb 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -96,8 +96,7 @@ class FilecryptCc(Crypter): imgtype="gif") self.siteWithLinks = self.load(self.pyfile.url, - post={'recaptcha_response_field': captcha_code}, - decode=True) + post={'recaptcha_response_field': captcha_code}) elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) @@ -105,8 +104,7 @@ class FilecryptCc(Crypter): result_type='positional') self.siteWithLinks = self.load(self.pyfile.url, - post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, - decode=True) + post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}) else: recaptcha = ReCaptcha(self) @@ -115,8 +113,7 @@ class FilecryptCc(Crypter): if captcha_key: response, challenge = recaptcha.challenge(captcha_key) self.siteWithLinks = self.load(self.pyfile.url, - post={'g-recaptcha-response': response}, - decode=True) + post={'g-recaptcha-response': response}) else: self.logInfo(_("No captcha found")) self.siteWithLinks = self.html -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- module/plugins/crypter/FilecryptCc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 7ca5659fb..769877802 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -160,16 +160,16 @@ class FilecryptCc(Crypter): def _getLinks(self, crypted, jk): - # Get key + #: Get key key = binascii.unhexlify(str(jk)) - # Decrypt + #: Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) text = obj.decrypt(crypted.decode('base64')) - # Extract links + #: Extract links text = text.replace("\x00", "").replace("\r", "") links = filter(bool, text.split('\n')) -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/crypter/FilecryptCc.py | 72 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 769877802..341b1e13f 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -16,7 +16,7 @@ from module.plugins.internal.ReCaptcha import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -47,36 +47,36 @@ class FilecryptCc(Crypter): if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() - self.handlePasswordProtection() - self.handleCaptcha() - self.handleMirrorPages() + self.handle_password_protection() + self.handle_captcha() + self.handle_mirror_pages() - for handle in (self.handleCNL, self.handleWeblinks, self.handleDlcContainer): + for handle in (self.handle_CNL, self.handle_weblinks, self.handle_dlc_container): handle() if self.links: self.packages = [(pyfile.package().name, self.links, pyfile.package().name)] return - def handleMirrorPages(self): - if "mirror=" not in self.siteWithLinks: + def handle_mirror_pages(self): + if "mirror=" not in self.site_with_links: return - mirror = re.findall(self.MIRROR_PAGE_PATTERN, self.siteWithLinks) + mirror = re.findall(self.MIRROR_PAGE_PATTERN, self.site_with_links) - self.logInfo(_("Found %d mirrors") % len(mirror)) + self.log_info(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - self.siteWithLinks = self.siteWithLinks + self.load(i).decode("utf-8", "replace") + self.site_with_links = self.site_with_links + self.load(i).decode("utf-8", "replace") - def handlePasswordProtection(self): + def handle_password_protection(self): if '', self.siteWithLinks) - vcrypted = re.findall('', self.siteWithLinks) + vjk = re.findall('', self.site_with_links) + vcrypted = re.findall('', self.site_with_links) for i in xrange(len(vcrypted)): - self.links.extend(self._getLinks(vcrypted[i], vjk[i])) + self.links.extend(self._get_links(vcrypted[i], vjk[i])) except Exception, e: - self.logDebug("Error decrypting CNL: %s" % e) + self.log_debug("Error decrypting CNL: %s" % e) - def _getLinks(self, crypted, jk): + def _get_links(self, crypted, jk): #: Get key key = binascii.unhexlify(str(jk)) -- cgit v1.2.3 From dad722ac7255640e7e0541c4094a4d2e4de79cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 00:05:58 +0200 Subject: Code cosmetics (2) --- module/plugins/crypter/FilecryptCc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 341b1e13f..624dadb94 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -88,7 +88,7 @@ class FilecryptCc(Crypter): m = re.search(self.CAPTCHA_PATTERN, self.html) m2 = re.search(self.CIRCLE_CAPTCHA_PATTERN, self.html) - if m: #: normal captcha + if m: #: Normal captcha self.log_debug("Captcha-URL: %s" % m.group(1)) captcha_code = self.decrypt_captcha(urlparse.urljoin(self.base_url, m.group(1)), @@ -97,7 +97,7 @@ class FilecryptCc(Crypter): self.site_with_links = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}) - elif m2: #: circle captcha + elif m2: #: Circle captcha self.log_debug("Captcha-URL: %s" % m2.group(1)) captcha_code = self.decrypt_captcha('%s%s?c=abc' %(self.base_url, m2.group(1)), -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/crypter/FilecryptCc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 624dadb94..94356ed31 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -81,7 +81,7 @@ class FilecryptCc(Crypter): if not password: self.fail(_("Please enter the password in package section and try again")) - self.html = self.load(self.pyfile.url, post={"password": password}) + self.html = self.load(self.pyfile.url, post={'password': password}) def handle_captcha(self): -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/crypter/FilecryptCc.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 94356ed31..24f03d175 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -17,6 +17,7 @@ class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" __version__ = "0.17" + __status__ = "stable" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' -- cgit v1.2.3 From 027cb529d79558de19c47da88a782b31745a65c9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 21 Jul 2015 22:53:37 +0200 Subject: New Captcha skeleton --- module/plugins/crypter/FilecryptCc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 24f03d175..23636f3b7 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -92,17 +92,17 @@ class FilecryptCc(Crypter): if m: #: Normal captcha self.log_debug("Captcha-URL: %s" % m.group(1)) - captcha_code = self.decrypt_captcha(urlparse.urljoin(self.base_url, m.group(1)), - forceUser=True, - imgtype="gif") + captcha_code = self.captcha.decrypt_image(urlparse.urljoin(self.base_url, m.group(1)), + input_type="gif", + try_ocr=False) self.site_with_links = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}) elif m2: #: Circle captcha self.log_debug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decrypt_captcha('%s%s?c=abc' %(self.base_url, m2.group(1)), - result_type='positional') + captcha_code = self.captcha.decrypt_image('%s%s?c=abc' %(self.base_url, m2.group(1)), + output_type='positional') self.site_with_links = self.load(self.pyfile.url, post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}) @@ -120,7 +120,7 @@ class FilecryptCc(Crypter): self.site_with_links = self.html if "recaptcha_image" in self.site_with_links or "data-sitekey" in self.site_with_links: - self.invalid_captcha() + self.captcha.invalid() self.retry() -- cgit v1.2.3 From 6af9b38a8d5d49355b85aef6ddd003605d6bba05 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 23 Jul 2015 23:44:45 +0200 Subject: Improve Captcha --- module/plugins/crypter/FilecryptCc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 23636f3b7..3d0d089a7 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -10,7 +10,7 @@ import urlparse from Crypto.Cipher import AES from module.plugins.internal.Crypter import Crypter -from module.plugins.internal.ReCaptcha import ReCaptcha +from module.plugins.captcha.ReCaptcha import ReCaptcha class FilecryptCc(Crypter): @@ -92,16 +92,16 @@ class FilecryptCc(Crypter): if m: #: Normal captcha self.log_debug("Captcha-URL: %s" % m.group(1)) - captcha_code = self.captcha.decrypt_image(urlparse.urljoin(self.base_url, m.group(1)), + captcha_code = self.captcha.decrypt(urlparse.urljoin(self.base_url, m.group(1)), input_type="gif", - try_ocr=False) + ocr=False) self.site_with_links = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}) elif m2: #: Circle captcha self.log_debug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.captcha.decrypt_image('%s%s?c=abc' %(self.base_url, m2.group(1)), + captcha_code = self.captcha.decrypt('%s%s?c=abc' %(self.base_url, m2.group(1)), output_type='positional') self.site_with_links = self.load(self.pyfile.url, -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/crypter/FilecryptCc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 3d0d089a7..af4e3dfb1 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -17,7 +17,7 @@ class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" __version__ = "0.17" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' -- cgit v1.2.3 From 82700f41f1e86374e6c30f3f8429707fd67d5ad9 Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Thu, 30 Jul 2015 13:28:16 +0200 Subject: [FilecryptCc.py] Fix https://github.com/pyload/pyload/issues/1614 --- module/plugins/crypter/FilecryptCc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index af4e3dfb1..ff2620b53 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -16,7 +16,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -68,7 +68,10 @@ class FilecryptCc(Crypter): self.log_info(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - self.site_with_links = self.site_with_links + self.load(i).decode("utf-8", "replace") + try: + self.site_with_links = self.site_with_links + self.load(i).decode("utf-8", "replace") + except: + self.site_with_links = self.site_with_links + self.load(i) def handle_password_protection(self): -- cgit v1.2.3 From 3b6e1b55a0ab527af98c901cf2d855359500b14e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 30 Jul 2015 14:52:01 +0200 Subject: [AntiStandby] Fix max_mtime method --- module/plugins/crypter/FilecryptCc.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index ff2620b53..62b6c9ee2 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -68,10 +68,7 @@ class FilecryptCc(Crypter): self.log_info(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - try: - self.site_with_links = self.site_with_links + self.load(i).decode("utf-8", "replace") - except: - self.site_with_links = self.site_with_links + self.load(i) + self.site_with_links = self.site_with_links + self.load(i) def handle_password_protection(self): -- cgit v1.2.3 From dc47212c8e801d380e4db4bd1bec0bf183de9de1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 31 Jul 2015 05:48:44 +0200 Subject: [Captcha] Fix _decrypt method --- module/plugins/crypter/FilecryptCc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 62b6c9ee2..9f4ad69aa 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -93,8 +93,7 @@ class FilecryptCc(Crypter): self.log_debug("Captcha-URL: %s" % m.group(1)) captcha_code = self.captcha.decrypt(urlparse.urljoin(self.base_url, m.group(1)), - input_type="gif", - ocr=False) + input_type="gif") self.site_with_links = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}) -- cgit v1.2.3