diff options
Diffstat (limited to 'pyload/plugin')
-rw-r--r-- | pyload/plugin/captcha/ReCaptcha.py | 5 | ||||
-rw-r--r-- | pyload/plugin/crypter/DlProtectCom.py | 5 | ||||
-rw-r--r-- | pyload/plugin/hook/Captcha9Kw.py | 5 | ||||
-rw-r--r-- | pyload/plugin/hook/DeathByCaptcha.py | 6 | ||||
-rw-r--r-- | pyload/plugin/hook/ExpertDecoders.py | 6 | ||||
-rw-r--r-- | pyload/plugin/hook/ImageTyperz.py | 6 | ||||
-rw-r--r-- | pyload/plugin/hoster/MegaCoNz.py | 5 |
7 files changed, 17 insertions, 21 deletions
diff --git a/pyload/plugin/captcha/ReCaptcha.py b/pyload/plugin/captcha/ReCaptcha.py index dc431f2ea..37da91a58 100644 --- a/pyload/plugin/captcha/ReCaptcha.py +++ b/pyload/plugin/captcha/ReCaptcha.py @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- +import base64 import random import re import time import urlparse -from base64 import b64encode - from pyload.plugin.Captcha import Captcha @@ -176,7 +175,7 @@ class ReCaptcha(Captcha): get={'c':token3.group(1), 'k':key}, cookies=True, forceUser=True) - response = b64encode('{"response":"%s"}' % captcha_response) + response = base64.b64encode('{"response":"%s"}' % captcha_response) self.logDebug("Result: %s" % response) diff --git a/pyload/plugin/crypter/DlProtectCom.py b/pyload/plugin/crypter/DlProtectCom.py index eae6d1d83..757f7d592 100644 --- a/pyload/plugin/crypter/DlProtectCom.py +++ b/pyload/plugin/crypter/DlProtectCom.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- +import base64 import re import time -from base64 import urlsafe_b64encode - from pyload.plugin.internal.SimpleCrypter import SimpleCrypter @@ -42,7 +41,7 @@ class DlProtectCom(SimpleCrypter): else: mstime = int(round(time.time() * 1000)) - b64time = "_" + urlsafe_b64encode(str(mstime)).replace("=", "%3D") + b64time = "_" + base64.urlsafe_b64encode(str(mstime)).replace("=", "%3D") post_req.update({'i' : b64time, 'submitform': "Decrypt+link"}) diff --git a/pyload/plugin/hook/Captcha9Kw.py b/pyload/plugin/hook/Captcha9Kw.py index 9ceab4b2b..32aaba0f5 100644 --- a/pyload/plugin/hook/Captcha9Kw.py +++ b/pyload/plugin/hook/Captcha9Kw.py @@ -2,11 +2,10 @@ from __future__ import with_statement +import base64 import re import time -from base64 import b64encode - from pyload.network.HTTPRequest import BadHeader from pyload.network.RequestFactory import getURL @@ -121,7 +120,7 @@ class Captcha9Kw(Hook): 'source' : "pyload", 'base64' : "1", 'mouse' : 1 if task.isPositional() else 0, - 'file-upload-01': b64encode(data), + 'file-upload-01': base64.b64encode(data), 'action' : "usercaptchaupload"} for _i in xrange(5): diff --git a/pyload/plugin/hook/DeathByCaptcha.py b/pyload/plugin/hook/DeathByCaptcha.py index 670807bf5..ddcdeae8a 100644 --- a/pyload/plugin/hook/DeathByCaptcha.py +++ b/pyload/plugin/hook/DeathByCaptcha.py @@ -2,11 +2,11 @@ from __future__ import with_statement -import pycurl +import base64 import re import time -from base64 import b64encode +import pycurl from pyload.utils import json_loads from pyload.network.HTTPRequest import BadHeader @@ -139,7 +139,7 @@ class DeathByCaptcha(Hook): multipart = False with open(captcha, 'rb') as f: data = f.read() - data = "base64:" + b64encode(data) + data = "base64:" + base64.b64encode(data) res = self.api_response("captcha", {"captchafile": data}, multipart) diff --git a/pyload/plugin/hook/ExpertDecoders.py b/pyload/plugin/hook/ExpertDecoders.py index 0727c0407..2e05e7386 100644 --- a/pyload/plugin/hook/ExpertDecoders.py +++ b/pyload/plugin/hook/ExpertDecoders.py @@ -2,10 +2,10 @@ from __future__ import with_statement -import pycurl +import base64 import uuid -from base64 import b64encode +import pycurl from pyload.network.HTTPRequest import BadHeader from pyload.network.RequestFactory import getURL, getRequest @@ -62,7 +62,7 @@ class ExpertDecoders(Hook): result = req.load(self.API_URL, post={'action' : "upload", 'key' : self.getConfig('passkey'), - 'file' : b64encode(data), + 'file' : base64.b64encode(data), 'gen_task_id': ticket}) finally: req.close() diff --git a/pyload/plugin/hook/ImageTyperz.py b/pyload/plugin/hook/ImageTyperz.py index 3f0147776..039710436 100644 --- a/pyload/plugin/hook/ImageTyperz.py +++ b/pyload/plugin/hook/ImageTyperz.py @@ -2,10 +2,10 @@ from __future__ import with_statement -import pycurl +import base64 import re -from base64 import b64encode +import pycurl from pyload.network.RequestFactory import getURL, getRequest from pyload.plugin.Hook import Hook, threaded @@ -81,7 +81,7 @@ class ImageTyperz(Hook): multipart = False with open(captcha, 'rb') as f: data = f.read() - data = b64encode(data) + data = base64.b64encode(data) res = req.load(self.SUBMIT_URL, post={'action': "UPLOADCAPTCHA", diff --git a/pyload/plugin/hoster/MegaCoNz.py b/pyload/plugin/hoster/MegaCoNz.py index 2d7b40d98..2e6735ee6 100644 --- a/pyload/plugin/hoster/MegaCoNz.py +++ b/pyload/plugin/hoster/MegaCoNz.py @@ -1,13 +1,12 @@ # -*- coding: utf-8 -*- import array +import base64 import os # import pycurl import random import re -from base64 import standard_b64decode - from Crypto.Cipher import AES from Crypto.Util import Counter @@ -64,7 +63,7 @@ class MegaCoNz(Hoster): def b64_decode(self, data): data = data.replace("-", "+").replace("_", "/") - return standard_b64decode(data + '=' * (-len(data) % 4)) + return base64.standard_b64decode(data + '=' * (-len(data) % 4)) def getCipherKey(self, key): |