diff options
author | Stefano <l.stickell@yahoo.it> | 2013-07-22 20:50:34 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-07-22 20:50:34 +0200 |
commit | 2edeee0532ec6d6b4b26fd045a5971f67ca455da (patch) | |
tree | 8d656afc9c18f7dba7c05d6635f898fdf58d66d6 /module/plugins/hoster/MegaNz.py | |
parent | Fixed PEP 8 violations in Crypters (diff) | |
download | pyload-2edeee0532ec6d6b4b26fd045a5971f67ca455da.tar.xz |
Fixed PEP 8 violations in Hosters
Diffstat (limited to 'module/plugins/hoster/MegaNz.py')
-rw-r--r-- | module/plugins/hoster/MegaNz.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/module/plugins/hoster/MegaNz.py b/module/plugins/hoster/MegaNz.py index e5be4eeb7..827d79328 100644 --- a/module/plugins/hoster/MegaNz.py +++ b/module/plugins/hoster/MegaNz.py @@ -15,6 +15,7 @@ from module.plugins.Hoster import Hoster #def getInfo(urls): # pass + class MegaNz(Hoster): __name__ = "MegaNz" __type__ = "hoster" @@ -64,7 +65,7 @@ class MegaNz(Hoster): n = key[16:24] # convert counter to long and shift bytes - ctr = Counter.new(128, initial_value=long(n.encode("hex"),16) << 64) + ctr = Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64) cipher = AES.new(self.getCipherKey(key), AES.MODE_CTR, counter=ctr) self.pyfile.setStatus("decrypting") @@ -73,10 +74,11 @@ class MegaNz(Hoster): # TODO: calculate CBC-MAC for checksum - size = 2 ** 15 # buffer size, 32k + size = 2 ** 15 # buffer size, 32k while True: buf = f.read(size) - if not buf: break + if not buf: + break df.write(cipher.decrypt(buf)) |