diff options
Diffstat (limited to 'pyload/plugin/hoster')
-rw-r--r-- | pyload/plugin/hoster/MegaCoNz.py | 9 | ||||
-rw-r--r-- | pyload/plugin/hoster/TurbobitNet.py | 4 | ||||
-rw-r--r-- | pyload/plugin/hoster/ZDF.py | 5 | ||||
-rw-r--r-- | pyload/plugin/hoster/ZippyshareCom.py | 4 |
4 files changed, 10 insertions, 12 deletions
diff --git a/pyload/plugin/hoster/MegaCoNz.py b/pyload/plugin/hoster/MegaCoNz.py index 2e6735ee6..83409fde9 100644 --- a/pyload/plugin/hoster/MegaCoNz.py +++ b/pyload/plugin/hoster/MegaCoNz.py @@ -7,8 +7,7 @@ import os import random import re -from Crypto.Cipher import AES -from Crypto.Util import Counter +import Crypto from pyload.utils import json_loads, json_dumps from pyload.plugin.Hoster import Hoster @@ -90,7 +89,7 @@ class MegaCoNz(Hoster): def decryptAttr(self, data, key): k, iv, meta_mac = self.getCipherKey(key) - cbc = AES.new(k, AES.MODE_CBC, "\0" * 16) + cbc = Crypto.Cipher.AES.new(k, Crypto.Cipher.AES.MODE_CBC, "\0" * 16) attr = decode(cbc.decrypt(self.b64_decode(data))) self.logDebug("Decrypted Attr: %s" % attr) @@ -109,8 +108,8 @@ class MegaCoNz(Hoster): # convert counter to long and shift bytes k, iv, meta_mac = self.getCipherKey(key) - ctr = Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) - cipher = AES.new(k, AES.MODE_CTR, counter=ctr) + ctr = Crypto.Util.Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) + cipher = Crypto.Cipher.AES.new(k, Crypto.Cipher.AES.MODE_CTR, counter=ctr) self.pyfile.setStatus("decrypting") self.pyfile.setProgress(0) diff --git a/pyload/plugin/hoster/TurbobitNet.py b/pyload/plugin/hoster/TurbobitNet.py index bcbeddd17..8138e2e23 100644 --- a/pyload/plugin/hoster/TurbobitNet.py +++ b/pyload/plugin/hoster/TurbobitNet.py @@ -7,7 +7,7 @@ import re import time import urllib -from Crypto.Cipher import ARC4 +import Crypto from pyload.network.RequestFactory import getURL from pyload.plugin.captcha.ReCaptcha import ReCaptcha @@ -155,7 +155,7 @@ class TurbobitNet(SimpleHoster): def decrypt(self, data): - cipher = ARC4.new(binascii.hexlify('E\x15\xa1\x9e\xa3M\xa0\xc6\xa0\x84\xb6H\x83\xa8o\xa0')) + cipher = Crypto.Cipher.ARC4.new(binascii.hexlify('E\x15\xa1\x9e\xa3M\xa0\xc6\xa0\x84\xb6H\x83\xa8o\xa0')) return binascii.unhexlify(cipher.encrypt(binascii.unhexlify(data))) diff --git a/pyload/plugin/hoster/ZDF.py b/pyload/plugin/hoster/ZDF.py index c02eadc23..8272cfd93 100644 --- a/pyload/plugin/hoster/ZDF.py +++ b/pyload/plugin/hoster/ZDF.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- import re - -from xml.etree.ElementTree import fromstring +import xml from pyload.plugin.Hoster import Hoster @@ -42,7 +41,7 @@ class ZDF(Hoster): def process(self, pyfile): - xml = fromstring(self.load(self.XML_API % self.get_id(pyfile.url))) + xml = xml.etree.ElementTree.fromstring(self.load(self.XML_API % self.get_id(pyfile.url))) status = xml.findtext("./status/statuscode") if status != "ok": diff --git a/pyload/plugin/hoster/ZippyshareCom.py b/pyload/plugin/hoster/ZippyshareCom.py index 40a879b55..df9af062b 100644 --- a/pyload/plugin/hoster/ZippyshareCom.py +++ b/pyload/plugin/hoster/ZippyshareCom.py @@ -3,7 +3,7 @@ import re import urllib -from BeautifulSoup import BeautifulSoup +import BeautifulSoup from pyload.plugin.captcha.ReCaptcha import ReCaptcha from pyload.plugin.internal.SimpleHoster import SimpleHoster @@ -59,7 +59,7 @@ class ZippyshareCom(SimpleHoster): def get_link(self): # get all the scripts inside the html body - soup = BeautifulSoup(self.html) + soup = BeautifulSoup.BeautifulSoup(self.html) scripts = (s.getText().strip() for s in soup.body.findAll('script', type='text/javascript')) # meant to be populated with the initialization of all the DOM elements found in the scripts |