diff options
Diffstat (limited to 'module/plugins')
| -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() | 
