summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
authorGravatar zapp-brannigan <zapp-brannigan@users.noreply.github.com> 2015-01-14 12:43:54 +0100
committerGravatar zapp-brannigan <zapp-brannigan@users.noreply.github.com> 2015-01-14 12:43:54 +0100
commit5203917e9c1a84c1a86796146eed2572d0c30f94 (patch)
tree1e68ebedf6c01e2b3a8f217e8750920354105a62 /module/plugins/crypter
parent[SimpleCrypter] Fix new getLinks routine (diff)
downloadpyload-5203917e9c1a84c1a86796146eed2572d0c30f94.tar.xz
[FilecryptCc.py] Added support for ReCaptchaV2
Fix for https://github.com/pyload/pyload/issues/976
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/FilecryptCc.py31
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()