diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-16 10:25:56 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-27 22:32:04 +0100 |
commit | 36bdc18df59837a8ce2f7630e49e753867573e82 (patch) | |
tree | f453614944af959756eb7e55367ae014c59d5208 /module/plugins | |
parent | [XFSHoster] Improve a bit (diff) | |
download | pyload-36bdc18df59837a8ce2f7630e49e753867573e82.tar.xz |
Update containers
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/container/CCF.py | 6 | ||||
-rw-r--r-- | module/plugins/container/DLC.py | 10 | ||||
-rw-r--r-- | module/plugins/container/RSDF.py | 10 | ||||
-rw-r--r-- | module/plugins/container/TXT.py | 8 |
4 files changed, 17 insertions, 17 deletions
diff --git a/module/plugins/container/CCF.py b/module/plugins/container/CCF.py index 563eaef6d..2feccee0a 100644 --- a/module/plugins/container/CCF.py +++ b/module/plugins/container/CCF.py @@ -8,13 +8,13 @@ import urllib2 import MultipartPostHandler from module.plugins.internal.Container import Container -from module.plugins.internal.utils import encode, fs_join +from module.plugins.internal.misc import encode, fsjoin class CCF(Container): __name__ = "CCF" __type__ = "container" - __version__ = "0.27" + __version__ = "0.28" __status__ = "testing" __pattern__ = r'.+\.ccf$' @@ -38,7 +38,7 @@ class CCF(Container): 'upload' : open(fs_filename, "rb")}).read() dl_folder = self.pyload.config.get("general", "download_folder") - dlc_file = fs_join(dl_folder, "tmp_%s.dlc" % pyfile.name) + dlc_file = fsjoin(dl_folder, "tmp_%s.dlc" % pyfile.name) try: dlc = re.search(r'<dlc>(.+)</dlc>', dlc_content, re.S).group(1).decode('base64') diff --git a/module/plugins/container/DLC.py b/module/plugins/container/DLC.py index 7b4364a0a..10a2899c8 100644 --- a/module/plugins/container/DLC.py +++ b/module/plugins/container/DLC.py @@ -5,16 +5,16 @@ from __future__ import with_statement import re import xml.dom.minidom -from Crypto.Cipher import AES +import Crypto.Cipher from module.plugins.internal.Container import Container -from module.plugins.internal.utils import decode, encode +from module.plugins.internal.misc import decode, encode class DLC(Container): __name__ = "DLC" __type__ = "container" - __version__ = "0.28" + __version__ = "0.29" __status__ = "testing" __pattern__ = r'(.+\.dlc|[\w\+^_]+==[\w\+^_/]+==)$' @@ -53,9 +53,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.get_packages()] diff --git a/module/plugins/container/RSDF.py b/module/plugins/container/RSDF.py index 2401a79ce..b0bfdc3bd 100644 --- a/module/plugins/container/RSDF.py +++ b/module/plugins/container/RSDF.py @@ -5,16 +5,16 @@ from __future__ import with_statement import binascii import re -from Crypto.Cipher import AES +import Crypto.Cipher from module.plugins.internal.Container import Container -from module.plugins.internal.utils import encode +from module.plugins.internal.misc import encode class RSDF(Container): __name__ = "RSDF" __type__ = "container" - __version__ = "0.33" + __version__ = "0.34" __status__ = "testing" __pattern__ = r'.+\.rsdf$' @@ -37,8 +37,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 = encode(pyfile.url.strip()) diff --git a/module/plugins/container/TXT.py b/module/plugins/container/TXT.py index 741538947..b31f42d49 100644 --- a/module/plugins/container/TXT.py +++ b/module/plugins/container/TXT.py @@ -3,13 +3,13 @@ import codecs from module.plugins.internal.Container import Container -from module.plugins.internal.utils import encode +from module.plugins.internal.misc import encode class TXT(Container): __name__ = "TXT" __type__ = "container" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __pattern__ = r'.+\.(txt|text)$' @@ -27,7 +27,7 @@ class TXT(Container): def decrypt(self, pyfile): try: - encoding = codecs.lookup(self.get_config('encoding')).name + encoding = codecs.lookup(self.config.get('encoding')).name except Exception: encoding = "utf-8" @@ -61,7 +61,7 @@ class TXT(Container): if not value: packages.pop(key, None) - if self.get_config('flush'): + if self.config.get('flush'): try: txt = open(fs_filename, 'wb') txt.close() |