diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 14:03:56 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 14:03:56 +0200 |
commit | 304a42b914cde43a31a935181b0f952c726eee54 (patch) | |
tree | 104a496ed690c187a479cde5b829f4e76b21c1cd /pyload/plugin/hoster/MegaCoNz.py | |
parent | Other import fixes (diff) | |
download | pyload-304a42b914cde43a31a935181b0f952c726eee54.tar.xz |
Other import fixes (2)
Diffstat (limited to 'pyload/plugin/hoster/MegaCoNz.py')
-rw-r--r-- | pyload/plugin/hoster/MegaCoNz.py | 9 |
1 files changed, 4 insertions, 5 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) |