summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/MegaNz.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-07-22 20:50:34 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-07-22 21:20:06 +0200
commitaaaf5a4cddec894aacd7400c59a9f2f5e710362f (patch)
tree9d9e89aff86598b3ffcc86117abd554b193e28b5 /pyload/plugins/hoster/MegaNz.py
parentimplemented media type filter (diff)
downloadpyload-aaaf5a4cddec894aacd7400c59a9f2f5e710362f.tar.xz
Fixed PEP 8 violations in Hosters
(cherry picked from commit 2edeee0532ec6d6b4b26fd045a5971f67ca455da) Conflicts: pyload/plugins/hoster/BasePlugin.py pyload/plugins/hoster/MultishareCz.py pyload/plugins/hoster/NetloadIn.py pyload/plugins/hoster/PremiumizeMe.py pyload/plugins/hoster/RapidshareCom.py
Diffstat (limited to 'pyload/plugins/hoster/MegaNz.py')
-rw-r--r--pyload/plugins/hoster/MegaNz.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pyload/plugins/hoster/MegaNz.py b/pyload/plugins/hoster/MegaNz.py
index e5be4eeb7..827d79328 100644
--- a/pyload/plugins/hoster/MegaNz.py
+++ b/pyload/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))