From e437fc0ba03537c8ea0e58139be731c16505b8ac Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 21:25:20 +0100 Subject: [FilecryptCc] ReCaptcha 2.0 support --- module/plugins/crypter/FilecryptCc.py | 18 ++++++++++++++---- 1 file changed, 14 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 087f377ff..59960ab24 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -8,12 +8,13 @@ from Crypto.Cipher import AES from urlparse import urljoin from module.plugins.Crypter import Crypter +from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -79,7 +80,7 @@ class FilecryptCc(Crypter): def handleCaptcha(self): - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.html) m2 = re.search(self.CIRCLE_CAPTCHA_PATTERN, self.html) if m: #: normal captcha @@ -106,8 +107,17 @@ class FilecryptCc(Crypter): cookies=True, decode=True) else: - self.logDebug("No captcha found") - self.siteWithLinks = self.html + recaptcha = ReCaptcha(self) + captcha_key = recaptcha.detect_key() + + if captcha_key: + self.siteWithLinks = self.load(self.pyfile.url, + post={'g-recaptcha-response': recaptcha.challenge(captcha_key, True)}, + cookies=True, + decode=True) + else: + self.logDebug("No captcha found") + self.siteWithLinks = self.html if "recaptcha_image" in self.siteWithLinks: self.invalidCaptcha() -- cgit v1.2.3 From a6b9146916a3c2cf45e376ca80b08db5b71eb20b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 02:39:54 +0100 Subject: [FilecryptCc] Fix handlePasswordProtection --- module/plugins/crypter/FilecryptCc.py | 8 +++++--- 1 file changed, 5 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 59960ab24..726389ca1 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -73,10 +73,12 @@ class FilecryptCc(Crypter): self.logInfo(_("Folder is password protected")) - if not self.pyfile.package().password: + password = self.getPassword() + + if not password: self.fail(_("Please enter the password in package section and try again")) - self.html = self.load(self.pyfile.url, post={"password": self.password}, cookies=True) + self.html = self.load(self.pyfile.url, post={"password": password}, cookies=True) def handleCaptcha(self): -- cgit v1.2.3 From 8d1231901b3ccccdc2d3d2593c0baf4ff7be4220 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 15:46:46 +0100 Subject: Spare code cosmetics --- 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 726389ca1..af31dc743 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -74,7 +74,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Folder is password protected")) password = self.getPassword() - + if not password: self.fail(_("Please enter the password in package section and try again")) -- cgit v1.2.3 From 5203917e9c1a84c1a86796146eed2572d0c30f94 Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Wed, 14 Jan 2015 12:43:54 +0100 Subject: [FilecryptCc.py] Added support for ReCaptchaV2 Fix for https://github.com/pyload/pyload/issues/976 --- module/plugins/crypter/FilecryptCc.py | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index af31dc743..51e6eb296 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- - +# http://filecrypt.cc/Container/64E039F859.html import base64 import binascii import re @@ -8,13 +8,13 @@ from Crypto.Cipher import AES from urlparse import urljoin from module.plugins.Crypter import Crypter -from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.CaptchaService import ReCaptchaV2 class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -74,7 +74,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Folder is password protected")) password = self.getPassword() - + if not password: self.fail(_("Please enter the password in package section and try again")) @@ -108,20 +108,17 @@ class FilecryptCc(Crypter): post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, cookies=True, decode=True) + + elif 'class="g-recaptcha"' in self.html: #: ReCaptchaV2 + captcha = ReCaptchaV2(self) + response = captcha.doTheCaptcha(self.pyfile.url.split("/")[2]) + self.siteWithLinks = self.load(self.pyfile.url, cookies=True, decode=True, post={"g-recaptcha-response":response}) + else: - recaptcha = ReCaptcha(self) - captcha_key = recaptcha.detect_key() - - if captcha_key: - self.siteWithLinks = self.load(self.pyfile.url, - post={'g-recaptcha-response': recaptcha.challenge(captcha_key, True)}, - cookies=True, - decode=True) - else: - self.logDebug("No captcha found") - self.siteWithLinks = self.html - - if "recaptcha_image" in self.siteWithLinks: + self.logInfo(_("No captcha found")) + self.siteWithLinks = self.html + + if "recaptcha_image" in self.siteWithLinks or "data-sitekey" in self.siteWithLinks: self.invalidCaptcha() self.retry() -- cgit v1.2.3 From cf4ded052964047de88d676045329b8fa4fca2dc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 22 Jan 2015 21:31:19 +0100 Subject: Update plugins after CaptchaService changes --- module/plugins/crypter/FilecryptCc.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 51e6eb296..096fd414d 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -8,13 +8,13 @@ from Crypto.Cipher import AES from urlparse import urljoin from module.plugins.Crypter import Crypter -from module.plugins.internal.CaptchaService import ReCaptchaV2 +from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.10" + __version__ = "0.11" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -74,7 +74,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Folder is password protected")) password = self.getPassword() - + if not password: self.fail(_("Please enter the password in package section and try again")) @@ -108,15 +108,19 @@ class FilecryptCc(Crypter): post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, cookies=True, decode=True) - - elif 'class="g-recaptcha"' in self.html: #: ReCaptchaV2 - captcha = ReCaptchaV2(self) - response = captcha.doTheCaptcha(self.pyfile.url.split("/")[2]) - self.siteWithLinks = self.load(self.pyfile.url, cookies=True, decode=True, post={"g-recaptcha-response":response}) - + else: - self.logInfo(_("No captcha found")) - self.siteWithLinks = self.html + recaptcha = ReCaptcha(self) + captcha_key = recaptcha.detect_key() + + if captcha_key: + response, challenge = recaptcha.challenge(captcha_key) + self.siteWithLinks = self.load(self.pyfile.url, + post={'g-recaptcha-response': response}, + decode=True) + else: + self.logInfo(_("No captcha found")) + self.siteWithLinks = self.html if "recaptcha_image" in self.siteWithLinks or "data-sitekey" in self.siteWithLinks: self.invalidCaptcha() -- 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/FilecryptCc.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 096fd414d..6773ce9b6 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # http://filecrypt.cc/Container/64E039F859.html -import base64 + import binascii import re @@ -167,14 +167,11 @@ class FilecryptCc(Crypter): # Get key key = binascii.unhexlify(str(jk)) - # 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 links = filter(lambda x: x != "", -- 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/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 6773ce9b6..d15d2ae4b 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -174,7 +174,7 @@ class FilecryptCc(Crypter): text = obj.decrypt(crypted.decode('base64')) # Extract links - links = filter(lambda x: x != "", - text.replace("\x00", "").replace("\r", "").split("\n")) + text = text.replace("\x00", "").replace("\r", "") + links = filter(bool, text.split('\n')) return links -- cgit v1.2.3 From 7beb65e991bc6d1913c3b5bb2ef69e659d5b8342 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 10 Mar 2015 01:55:52 +0100 Subject: Spare code cosmetics --- module/plugins/crypter/FilecryptCc.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index d15d2ae4b..baea8886b 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -39,7 +39,7 @@ class FilecryptCc(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url, cookies=True) + self.html = self.load(pyfile.url) if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() @@ -64,7 +64,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - self.siteWithLinks = self.siteWithLinks + self.load(i, cookies=True).decode("utf-8", "replace") + self.siteWithLinks = self.siteWithLinks + self.load(i).decode("utf-8", "replace") def handlePasswordProtection(self): @@ -78,7 +78,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}, cookies=True) + self.html = self.load(self.pyfile.url, post={"password": password}) def handleCaptcha(self): @@ -94,7 +94,6 @@ class FilecryptCc(Crypter): self.siteWithLinks = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}, - cookies=True, decode=True) elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) @@ -106,7 +105,6 @@ class FilecryptCc(Crypter): self.siteWithLinks = self.load(self.pyfile.url, post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, - cookies=True, decode=True) else: @@ -142,9 +140,9 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True) + res = self.load("http://filecrypt.cc/Link/%s.html" % link) link2 = re.search('', res) - res2 = self.load(link2.group(1), just_header=True, cookies=True) + res2 = self.load(link2.group(1), just_header=True) self.links.append(res2['location']) except Exception, e: -- cgit v1.2.3 From bd365a1fed377665b00c3d815b096b7fa7a26374 Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Wed, 22 Apr 2015 09:20:38 +0200 Subject: [FilecryptCc.py] Fix circle captcha Fix https://github.com/pyload/pyload/issues/1364 --- module/plugins/crypter/FilecryptCc.py | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index baea8886b..7679e9446 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # http://filecrypt.cc/Container/64E039F859.html - +import base64 import binascii import re @@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -39,7 +39,7 @@ class FilecryptCc(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url) + self.html = self.load(pyfile.url, cookies=True) if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() @@ -64,7 +64,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - self.siteWithLinks = self.siteWithLinks + self.load(i).decode("utf-8", "replace") + self.siteWithLinks = self.siteWithLinks + self.load(i, cookies=True).decode("utf-8", "replace") def handlePasswordProtection(self): @@ -78,7 +78,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}, cookies=True) def handleCaptcha(self): @@ -94,17 +94,17 @@ class FilecryptCc(Crypter): self.siteWithLinks = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}, + cookies=True, decode=True) elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decryptCaptcha(urljoin("http://filecrypt.cc", m2.group(1)), - forceUser=True, - imgtype="gif", + captcha_code = self.decryptCaptcha('https://www.filecrypt.cc/captcha/circle.php?c=abc', result_type='positional') - + self.siteWithLinks = self.load(self.pyfile.url, post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, + cookies=True, decode=True) else: @@ -140,9 +140,9 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("http://filecrypt.cc/Link/%s.html" % link) + res = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True) link2 = re.search('', res) - res2 = self.load(link2.group(1), just_header=True) + res2 = self.load(link2.group(1), just_header=True, cookies=True) self.links.append(res2['location']) except Exception, e: @@ -165,14 +165,17 @@ class FilecryptCc(Crypter): # Get key key = binascii.unhexlify(str(jk)) + # Decode crypted + crypted = base64.standard_b64decode(crypted) + # Decrypt Key = key IV = key obj = AES.new(Key, AES.MODE_CBC, IV) - text = obj.decrypt(crypted.decode('base64')) + text = obj.decrypt(crypted) # Extract links - text = text.replace("\x00", "").replace("\r", "") - links = filter(bool, text.split('\n')) + links = filter(lambda x: x != "", + text.replace("\x00", "").replace("\r", "").split("\n")) return links -- cgit v1.2.3 From efbbbfe6cdba907f678779c10fe6532bd1f0054e Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Wed, 22 Apr 2015 09:45:16 +0200 Subject: Update FilecryptCc.py --- module/plugins/crypter/FilecryptCc.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'module/plugins/crypter/FilecryptCc.py') diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 7679e9446..9dd4f665d 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # http://filecrypt.cc/Container/64E039F859.html -import base64 + import binascii import re @@ -39,7 +39,7 @@ class FilecryptCc(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url, cookies=True) + self.html = self.load(pyfile.url) if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() @@ -64,7 +64,7 @@ class FilecryptCc(Crypter): self.logInfo(_("Found %d mirrors") % len(mirror)) for i in mirror[1:]: - self.siteWithLinks = self.siteWithLinks + self.load(i, cookies=True).decode("utf-8", "replace") + self.siteWithLinks = self.siteWithLinks + self.load(i).decode("utf-8", "replace") def handlePasswordProtection(self): @@ -78,7 +78,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}, cookies=True) + self.html = self.load(self.pyfile.url, post={"password": password}) def handleCaptcha(self): @@ -94,17 +94,15 @@ class FilecryptCc(Crypter): self.siteWithLinks = self.load(self.pyfile.url, post={'recaptcha_response_field': captcha_code}, - cookies=True, decode=True) elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) captcha_code = self.decryptCaptcha('https://www.filecrypt.cc/captcha/circle.php?c=abc', result_type='positional') - + self.siteWithLinks = self.load(self.pyfile.url, post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}, - cookies=True, decode=True) else: @@ -140,9 +138,9 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("http://filecrypt.cc/Link/%s.html" % link, cookies=True) + res = self.load("http://filecrypt.cc/Link/%s.html" % link) link2 = re.search('', res) - res2 = self.load(link2.group(1), just_header=True, cookies=True) + res2 = self.load(link2.group(1), just_header=True) self.links.append(res2['location']) except Exception, e: @@ -165,17 +163,14 @@ class FilecryptCc(Crypter): # Get key key = binascii.unhexlify(str(jk)) - # 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 - links = filter(lambda x: x != "", - text.replace("\x00", "").replace("\r", "").split("\n")) + text = text.replace("\x00", "").replace("\r", "") + links = filter(bool, text.split('\n')) return links -- cgit v1.2.3 From 6f4f6a983362a8ac6037a04dfdb5c7e97aea761c Mon Sep 17 00:00:00 2001 From: Gutz-Pilz Date: Wed, 22 Apr 2015 14:39:57 +0200 Subject: remove "www" in circlecaptcha to get it working --- 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 9dd4f665d..ca4cf57cb 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -98,7 +98,7 @@ class FilecryptCc(Crypter): elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decryptCaptcha('https://www.filecrypt.cc/captcha/circle.php?c=abc', + captcha_code = self.decryptCaptcha('https://filecrypt.cc/captcha/circle.php?c=abc', result_type='positional') self.siteWithLinks = self.load(self.pyfile.url, -- cgit v1.2.3 From 3e9b1980a488ff9947554c6f72fbe18637f3567e Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Wed, 22 Apr 2015 21:02:21 +0200 Subject: [FilecryptCc.py] Avoid hardcoded urls Fix https://github.com/pyload/pyload/issues/1364 again ;) --- module/plugins/crypter/FilecryptCc.py | 13 +++++++------ 1 file changed, 7 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 ca4cf57cb..3c55ddd01 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -31,7 +31,7 @@ class FilecryptCc(Crypter): CAPTCHA_PATTERN = r'' + MIRROR_PAGE_PATTERN = r'"[\w]*" href="(https?://(?:www\.)?filecrypt.cc/Container/\w+\.html\?mirror=\d+)">' def setup(self): @@ -40,6 +40,7 @@ class FilecryptCc(Crypter): def decrypt(self, pyfile): self.html = self.load(pyfile.url) + self.base_url = self.pyfile.url.split("Container")[0] if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo self.offline() @@ -88,7 +89,7 @@ class FilecryptCc(Crypter): if m: #: normal captcha self.logDebug("Captcha-URL: %s" % m.group(1)) - captcha_code = self.decryptCaptcha(urljoin("http://filecrypt.cc", m.group(1)), + captcha_code = self.decryptCaptcha(urljoin(self.base_url, m.group(1)), forceUser=True, imgtype="gif") @@ -98,7 +99,7 @@ class FilecryptCc(Crypter): elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decryptCaptcha('https://filecrypt.cc/captcha/circle.php?c=abc', + captcha_code = self.decryptCaptcha('%s%s?c=abc' %(self.base_url,m2.group(1)), result_type='positional') self.siteWithLinks = self.load(self.pyfile.url, @@ -130,7 +131,7 @@ class FilecryptCc(Crypter): return for i in dlc: - self.links.append("http://filecrypt.cc/DLC/%s.dlc" % i) + self.links.append("%s/DLC/%s.dlc" % (self.base_url,i)) def handleWeblinks(self): @@ -138,7 +139,7 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("http://filecrypt.cc/Link/%s.html" % link) + res = self.load("%s/Link/%s.html" % (self.base_url,link)) link2 = re.search('', res) res2 = self.load(link2.group(1), just_header=True) self.links.append(res2['location']) -- cgit v1.2.3 From 2e13b1e9efedfbd39bbc5a0cee8795f6c46f842b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Apr 2015 21:18:24 +0200 Subject: [FilecryptCc] Version up --- module/plugins/crypter/FilecryptCc.py | 6 ++++-- 1 file changed, 4 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 ca4cf57cb..fdb65b657 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- -# http://filecrypt.cc/Container/64E039F859.html +# +# Test links: +# http://filecrypt.cc/Container/64E039F859.html import binascii import re @@ -14,7 +16,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' -- cgit v1.2.3 From bc7ea571a65f01d5eb2b30d6707418e4dad25258 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Apr 2015 21:32:48 +0200 Subject: [FilecryptCc] Version up (2) --- 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 1bbe8f4fe..495efd706 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -16,7 +16,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' @@ -101,7 +101,7 @@ class FilecryptCc(Crypter): elif m2: #: circle captcha self.logDebug("Captcha-URL: %s" % m2.group(1)) - captcha_code = self.decryptCaptcha('%s%s?c=abc' %(self.base_url,m2.group(1)), + captcha_code = self.decryptCaptcha('%s%s?c=abc' %(self.base_url, m2.group(1)), result_type='positional') self.siteWithLinks = self.load(self.pyfile.url, @@ -133,7 +133,7 @@ class FilecryptCc(Crypter): return for i in dlc: - self.links.append("%s/DLC/%s.dlc" % (self.base_url,i)) + self.links.append("%s/DLC/%s.dlc" % (self.base_url, i)) def handleWeblinks(self): @@ -141,7 +141,7 @@ class FilecryptCc(Crypter): weblinks = re.findall(self.WEBLINK_PATTERN, self.siteWithLinks) for link in weblinks: - res = self.load("%s/Link/%s.html" % (self.base_url,link)) + res = self.load("%s/Link/%s.html" % (self.base_url, link)) link2 = re.search('', res) res2 = self.load(link2.group(1), just_header=True) self.links.append(res2['location']) -- cgit v1.2.3 From 1ef93e913238275f7657d496ba3d2e7eeb5a30a2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 May 2015 01:06:01 +0200 Subject: Use 'import' instead 'from' --- 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 495efd706..a1a94b6f6 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -5,9 +5,9 @@ import binascii import re +import urlparse from Crypto.Cipher import AES -from urlparse import urljoin from module.plugins.Crypter import Crypter from module.plugins.internal.CaptchaService import ReCaptcha @@ -91,7 +91,7 @@ class FilecryptCc(Crypter): if m: #: normal captcha self.logDebug("Captcha-URL: %s" % m.group(1)) - captcha_code = self.decryptCaptcha(urljoin(self.base_url, m.group(1)), + captcha_code = self.decryptCaptcha(urlparse.urljoin(self.base_url, m.group(1)), forceUser=True, imgtype="gif") -- cgit v1.2.3