diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-18 00:15:31 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-18 00:15:31 +0100 |
commit | b0969e1c276b4bc6c98793b7f8dfaac910b98b43 (patch) | |
tree | 11ed0ec32e7d6f088f2c28422c7676aaa4d83927 /module | |
parent | Merge pull request #1043 from zapp-brannigan/patch-2 (diff) | |
parent | [FilecryptCc.py] Added support for ReCaptchaV2 (diff) | |
download | pyload-b0969e1c276b4bc6c98793b7f8dfaac910b98b43.tar.xz |
Merge pull request #1044 from zapp-brannigan/patch-3
[FilecryptCc.py] Added support for ReCaptchaV2
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/crypter/FilecryptCc.py | 31 |
1 files changed, 14 insertions, 17 deletions
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() |