diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-22 21:31:19 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-22 21:31:19 +0100 |
commit | cf4ded052964047de88d676045329b8fa4fca2dc (patch) | |
tree | 5864aad4f34b273044018393b6bb9be690162050 /module/plugins/crypter/FilecryptCc.py | |
parent | [CaptchaService] Merge together ReCaptcha versions (diff) | |
download | pyload-cf4ded052964047de88d676045329b8fa4fca2dc.tar.xz |
Update plugins after CaptchaService changes
Diffstat (limited to 'module/plugins/crypter/FilecryptCc.py')
-rw-r--r-- | module/plugins/crypter/FilecryptCc.py | 26 |
1 files changed, 15 insertions, 11 deletions
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() |