diff options
Diffstat (limited to 'pyload/plugin')
-rw-r--r-- | pyload/plugin/account/AlldebridCom.py | 4 | ||||
-rw-r--r-- | pyload/plugin/addon/SkipRev.py | 5 | ||||
-rw-r--r-- | pyload/plugin/container/DLC.py | 6 | ||||
-rw-r--r-- | pyload/plugin/container/RSDF.py | 6 | ||||
-rw-r--r-- | pyload/plugin/crypter/DuckCryptInfo.py | 6 | ||||
-rw-r--r-- | pyload/plugin/crypter/FilecryptCc.py | 4 | ||||
-rw-r--r-- | pyload/plugin/crypter/HoerbuchIn.py | 4 | ||||
-rw-r--r-- | pyload/plugin/crypter/LinkCryptWs.py | 4 | ||||
-rw-r--r-- | pyload/plugin/crypter/NCryptIn.py | 4 | ||||
-rw-r--r-- | pyload/plugin/crypter/RelinkUs.py | 5 | ||||
-rw-r--r-- | pyload/plugin/crypter/SafelinkingNet.py | 4 | ||||
-rw-r--r-- | pyload/plugin/crypter/ShareLinksBiz.py | 5 | ||||
-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 |
16 files changed, 39 insertions, 40 deletions
diff --git a/pyload/plugin/account/AlldebridCom.py b/pyload/plugin/account/AlldebridCom.py index efc5753f8..6ba7a80f9 100644 --- a/pyload/plugin/account/AlldebridCom.py +++ b/pyload/plugin/account/AlldebridCom.py @@ -4,7 +4,7 @@ import re import time import xml.dom.minidom as dom -from BeautifulSoup import BeautifulSoup +import BeautifulSoup from pyload.plugin.Account import Account @@ -22,7 +22,7 @@ class AlldebridCom(Account): def loadAccountInfo(self, user, req): data = self.getAccountData(user) html = req.load("http://www.alldebrid.com/account/") - soup = BeautifulSoup(html) + soup = BeautifulSoup.BeautifulSoup(html) # Try to parse expiration date directly from the control panel page (better accuracy) try: diff --git a/pyload/plugin/addon/SkipRev.py b/pyload/plugin/addon/SkipRev.py index b54e66af5..b19650710 100644 --- a/pyload/plugin/addon/SkipRev.py +++ b/pyload/plugin/addon/SkipRev.py @@ -3,8 +3,7 @@ import re import urllib import urlparse - -from types import MethodType +import types from pyload.datatype.File import PyFile from pyload.plugin.Addon import Addon @@ -75,7 +74,7 @@ class SkipRev(Addon): if not hasattr(pyfile.plugin, "_setup"): # Work-around: inject status checker inside the preprocessing routine of the plugin pyfile.plugin._setup = pyfile.plugin.setup - pyfile.plugin.setup = MethodType(self._setup, pyfile.plugin) + pyfile.plugin.setup = types.MethodType(self._setup, pyfile.plugin) def downloadFailed(self, pyfile): diff --git a/pyload/plugin/container/DLC.py b/pyload/plugin/container/DLC.py index b2bfea30e..39b1597b0 100644 --- a/pyload/plugin/container/DLC.py +++ b/pyload/plugin/container/DLC.py @@ -5,7 +5,7 @@ from __future__ import with_statement import re import xml.dom.minidom -from Crypto.Cipher import AES +import Crypto from pyload.plugin.Container import Container from pyload.utils import decode, fs_encode @@ -49,9 +49,9 @@ class DLC(Container): except AttributeError: self.fail(_("Container is corrupted")) - key = iv = AES.new(self.KEY, AES.MODE_CBC, self.IV).decrypt(rc) + key = iv = Crypto.Cipher.AES.new(self.KEY, Crypto.Cipher.AES.MODE_CBC, self.IV).decrypt(rc) - self.data = AES.new(key, AES.MODE_CBC, iv).decrypt(dlc_data).decode('base64') + self.data = Crypto.Cipher.AES.new(key, Crypto.Cipher.AES.MODE_CBC, iv).decrypt(dlc_data).decode('base64') self.packages = [(name or pyfile.name, links, name or pyfile.name) \ for name, links in self.getPackages()] diff --git a/pyload/plugin/container/RSDF.py b/pyload/plugin/container/RSDF.py index 6f56ec06a..1de8ad8d4 100644 --- a/pyload/plugin/container/RSDF.py +++ b/pyload/plugin/container/RSDF.py @@ -5,7 +5,7 @@ from __future__ import with_statement import binascii import re -from Crypto.Cipher import AES +import Crypto from pyload.plugin.Container import Container from pyload.utils import fs_encode @@ -33,8 +33,8 @@ class RSDF(Container): KEY = binascii.unhexlify(self.KEY) IV = binascii.unhexlify(self.IV) - iv = AES.new(KEY, AES.MODE_ECB).encrypt(IV) - cipher = AES.new(KEY, AES.MODE_CFB, iv) + iv = Crypto.Cipher.AES.new(KEY, Crypto.Cipher.AES.MODE_ECB).encrypt(IV) + cipher = Crypto.Cipher.AES.new(KEY, Crypto.Cipher.AES.MODE_CFB, iv) try: fs_filename = fs_encode(pyfile.url.strip()) diff --git a/pyload/plugin/crypter/DuckCryptInfo.py b/pyload/plugin/crypter/DuckCryptInfo.py index 3463d44f9..64d6568ce 100644 --- a/pyload/plugin/crypter/DuckCryptInfo.py +++ b/pyload/plugin/crypter/DuckCryptInfo.py @@ -2,7 +2,7 @@ import re -from BeautifulSoup import BeautifulSoup +import BeautifulSoup from pyload.plugin.Crypter import Crypter @@ -41,7 +41,7 @@ class DuckCryptInfo(Crypter): m = re.match(self.__pattern, html) self.logDebug("Redirectet to " + str(m.group(0))) html = self.load(str(m.group(0))) - soup = BeautifulSoup(html) + soup = BeautifulSoup.BeautifulSoup(html) cryptlinks = soup.findAll("div", attrs={"class": "folderbox"}) self.logDebug("Redirectet to " + str(cryptlinks)) if not cryptlinks: @@ -53,7 +53,7 @@ class DuckCryptInfo(Crypter): def handleLink(self, url): html = self.load(url) - soup = BeautifulSoup(html) + soup = BeautifulSoup.BeautifulSoup(html) self.urls = [soup.find("iframe")['src']] if not self.urls: self.logInfo(_("No link found")) diff --git a/pyload/plugin/crypter/FilecryptCc.py b/pyload/plugin/crypter/FilecryptCc.py index db939357a..0507a580b 100644 --- a/pyload/plugin/crypter/FilecryptCc.py +++ b/pyload/plugin/crypter/FilecryptCc.py @@ -7,7 +7,7 @@ import binascii import re import urlparse -from Crypto.Cipher import AES +import Crypto from pyload.plugin.Crypter import Crypter from pyload.plugin.captcha.ReCaptcha import ReCaptcha @@ -169,7 +169,7 @@ class FilecryptCc(Crypter): # Decrypt Key = key IV = key - obj = AES.new(Key, AES.MODE_CBC, IV) + obj = Crypto.Cipher.AES.new(Key, Crypto.Cipher.AES.MODE_CBC, IV) text = obj.decrypt(crypted.decode('base64')) # Extract links diff --git a/pyload/plugin/crypter/HoerbuchIn.py b/pyload/plugin/crypter/HoerbuchIn.py index 500dad8cc..455d0abdf 100644 --- a/pyload/plugin/crypter/HoerbuchIn.py +++ b/pyload/plugin/crypter/HoerbuchIn.py @@ -2,7 +2,7 @@ import re -from BeautifulSoup import BeautifulSoup, BeautifulStoneSoup +import BeautifulSoup, BeautifulStoneSoup from pyload.plugin.Crypter import Crypter @@ -31,7 +31,7 @@ class HoerbuchIn(Crypter): if self.article.match(pyfile.url): html = self.load(pyfile.url) - soup = BeautifulSoup(html, convertEntities=BeautifulStoneSoup.HTML_ENTITIES) + soup = BeautifulSoup.BeautifulSoup(html, convertEntities=BeautifulStoneSoup.HTML_ENTITIES) abookname = soup.find("a", attrs={"rel": "bookmark"}).text for a in soup.findAll("a", attrs={"href": self.protection}): diff --git a/pyload/plugin/crypter/LinkCryptWs.py b/pyload/plugin/crypter/LinkCryptWs.py index c997cbf9f..98a796aed 100644 --- a/pyload/plugin/crypter/LinkCryptWs.py +++ b/pyload/plugin/crypter/LinkCryptWs.py @@ -5,7 +5,7 @@ import re import pycurl -from Crypto.Cipher import AES +import Crypto from pyload.plugin.Crypter import Crypter from pyload.utils import html_unescape @@ -309,7 +309,7 @@ class LinkCryptWs(Crypter): # Decrypt Key = key IV = key - obj = AES.new(Key, AES.MODE_CBC, IV) + obj = Crypto.Cipher.AES.new(Key, Crypto.Cipher.AES.MODE_CBC, IV) text = obj.decrypt(crypted.decode('base64')) # Extract links diff --git a/pyload/plugin/crypter/NCryptIn.py b/pyload/plugin/crypter/NCryptIn.py index bc9702f21..2b357395b 100644 --- a/pyload/plugin/crypter/NCryptIn.py +++ b/pyload/plugin/crypter/NCryptIn.py @@ -3,7 +3,7 @@ import binascii import re -from Crypto.Cipher import AES +import Crypto from pyload.plugin.Crypter import Crypter from pyload.plugin.captcha.ReCaptcha import ReCaptcha @@ -298,7 +298,7 @@ class NCryptIn(Crypter): # Decrypt Key = key IV = key - obj = AES.new(Key, AES.MODE_CBC, IV) + obj = Crypto.Cipher.AES.new(Key, Crypto.Cipher.AES.MODE_CBC, IV) text = obj.decrypt(crypted.decode('base64')) # Extract links diff --git a/pyload/plugin/crypter/RelinkUs.py b/pyload/plugin/crypter/RelinkUs.py index 2b9a85401..3ffc33c12 100644 --- a/pyload/plugin/crypter/RelinkUs.py +++ b/pyload/plugin/crypter/RelinkUs.py @@ -6,7 +6,8 @@ import binascii import re import os -from Crypto.Cipher import AES +import Crypto + from pyload.plugin.Crypter import Crypter from pyload.utils import fs_join @@ -281,7 +282,7 @@ class RelinkUs(Crypter): # Decrypt Key = key IV = key - obj = AES.new(Key, AES.MODE_CBC, IV) + obj = Crypto.Cipher.AES.new(Key, Crypto.Cipher.AES.MODE_CBC, IV) text = obj.decrypt(crypted.decode('base64')) # Extract links diff --git a/pyload/plugin/crypter/SafelinkingNet.py b/pyload/plugin/crypter/SafelinkingNet.py index a949d17b1..71f41469b 100644 --- a/pyload/plugin/crypter/SafelinkingNet.py +++ b/pyload/plugin/crypter/SafelinkingNet.py @@ -2,7 +2,7 @@ import re -from BeautifulSoup import BeautifulSoup +import BeautifulSoup from pyload.utils import json_loads from pyload.plugin.Crypter import Crypter @@ -66,7 +66,7 @@ class SafelinkingNet(Crypter): break pyfile.package().password = "" - soup = BeautifulSoup(self.html) + soup = BeautifulSoup.BeautifulSoup(self.html) scripts = soup.findAll("script") for s in scripts: if "d_links" in s.text: diff --git a/pyload/plugin/crypter/ShareLinksBiz.py b/pyload/plugin/crypter/ShareLinksBiz.py index 8add5214d..25e891f3b 100644 --- a/pyload/plugin/crypter/ShareLinksBiz.py +++ b/pyload/plugin/crypter/ShareLinksBiz.py @@ -3,7 +3,8 @@ import binascii import re -from Crypto.Cipher import AES +import Crypto + from pyload.plugin.Crypter import Crypter @@ -267,7 +268,7 @@ class ShareLinksBiz(Crypter): # Decrypt Key = key IV = key - obj = AES.new(Key, AES.MODE_CBC, IV) + obj = Crypto.Cipher.AES.new(Key, Crypto.Cipher.AES.MODE_CBC, IV) text = obj.decrypt(crypted.decode('base64')) # Extract links 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 |