summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar zapp-brannigan <zapp-brannigan@users.noreply.github.com> 2015-04-22 09:45:16 +0200
committerGravatar zapp-brannigan <zapp-brannigan@users.noreply.github.com> 2015-04-22 09:45:16 +0200
commitefbbbfe6cdba907f678779c10fe6532bd1f0054e (patch)
treefcab3a7947ceda72dc25e261fcb35629b0aca8ed
parent[FilecryptCc.py] Fix circle captcha (diff)
downloadpyload-efbbbfe6cdba907f678779c10fe6532bd1f0054e.tar.xz
Update FilecryptCc.py
-rw-r--r--module/plugins/crypter/FilecryptCc.py25
1 files changed, 10 insertions, 15 deletions
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('<iframe noresize src="(.*)"></iframe>', 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