diff options
| author | 2015-01-27 18:10:23 +0100 | |
|---|---|---|
| committer | 2015-01-27 18:10:23 +0100 | |
| commit | 7a0c370482142b113ab70fa1bb1446223a707c62 (patch) | |
| tree | 7b93b42d71bd9c5191a6dc3ce5580537c0990a2f | |
| parent | [ZeveraCom] Detect expired account (diff) | |
| download | pyload-7a0c370482142b113ab70fa1bb1446223a707c62.tar.xz | |
[DLC] Improve
| -rw-r--r-- | module/plugins/container/DLC.py | 13 | 
1 files changed, 7 insertions, 6 deletions
| diff --git a/module/plugins/container/DLC.py b/module/plugins/container/DLC.py index f3fd4b808..53349c5c7 100644 --- a/module/plugins/container/DLC.py +++ b/module/plugins/container/DLC.py @@ -9,11 +9,12 @@ from base64 import standard_b64decode  from Crypto.Cipher import AES  from module.plugins.Container import Container +from module.utils import decode  class DLC(Container):      __name__        = "DLC" -    __version__     = "0.21" +    __version__     = "0.22"      __pattern__     = r'.+\.dlc$'      __description__ = """DLC container decrypter plugin""" @@ -21,7 +22,8 @@ class DLC(Container):      __authors__     = [("RaNaN", "RaNaN@pyload.org"),                         ("spoob", "spoob@pyload.org"),                         ("mkaay", "mkaay@mkaay.de"), -                       ("Schnusch", "Schnusch@users.noreply.github.com")] +                       ("Schnusch", "Schnusch@users.noreply.github.com"), +                       ("Walter Purcaro", "vuolter@gmail.com")]      def setup(self): @@ -34,14 +36,13 @@ class DLC(Container):          with open(pyfile.url.replace("\n", "")) as dlc:              data = dlc.read().strip() -        if not data.endswith("=="): -            data += "=" if data.endswith("=") else "==" +        data += '=' * (-len(data) % 4)          dlckey  = data[-88:]          dlcdata = data[:-88]          dlcdata = standard_b64decode(dlcdata) -        rc = self.req.load(self.api_url + dlckey) +        rc = self.load(self.api_url + dlckey)          rc = re.search(r'<rc>(.+)</rc>', rc).group(1)          rc = standard_b64decode(rc) @@ -61,7 +62,7 @@ class DLC(Container):      def parsePackages(self, startNode): -        return [(standard_b64decode(node.getAttribute("name")).decode("utf8", "replace"), self.parseLinks(node)) \ +        return [(standard_b64decode(decode(node.getAttribute("name"))), self.parseLinks(node)) \                  for node in startNode.getElementsByTagName("package")] | 
