summaryrefslogtreecommitdiffstats
path: root/module/plugins/container/RSDF.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-03 16:09:13 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-03 16:09:13 +0100
commit193cb8dbe1b24c24fb919461f16b2215e85da739 (patch)
tree5e3649a750666a8312b9f1de43d5b9e2f98da3b6 /module/plugins/container/RSDF.py
parent[ClickAndLoad] Fix https://github.com/pyload/pyload/issues/1135 (diff)
downloadpyload-193cb8dbe1b24c24fb919461f16b2215e85da739.tar.xz
Update container plugins
Diffstat (limited to 'module/plugins/container/RSDF.py')
-rw-r--r--module/plugins/container/RSDF.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/module/plugins/container/RSDF.py b/module/plugins/container/RSDF.py
index 06b3c3b2b..8f9bfc0d5 100644
--- a/module/plugins/container/RSDF.py
+++ b/module/plugins/container/RSDF.py
@@ -14,14 +14,15 @@ from module.utils import fs_encode
class RSDF(Container):
__name__ = "RSDF"
__type__ = "container"
- __version__ = "0.26"
+ __version__ = "0.27"
__pattern__ = r'.+\.rsdf$'
__description__ = """RSDF container decrypter plugin"""
__license__ = "GPLv3"
__authors__ = [("RaNaN", "RaNaN@pyload.org"),
- ("spoob", "spoob@pyload.org")]
+ ("spoob", "spoob@pyload.org"),
+ ("Walter Purcaro", "vuolter@gmail.com")]
KEY = "8C35192D964DC3182C6F84F3252239EB4A320D2500000000"
@@ -29,11 +30,10 @@ class RSDF(Container):
def decrypt(self, pyfile):
- Key = binascii.unhexlify(self.KEY)
- IV_Cipher = AES.new(Key, AES.MODE_ECB)
- IV = IV_Cipher.encrypt(binascii.unhexlify(self.IV))
+ KEY = binascii.unhexlify(self.KEY)
+ IV = AES.new(Key, AES.MODE_ECB).encrypt(binascii.unhexlify(self.IV))
- obj = AES.new(Key, AES.MODE_CFB, IV)
+ cipher = AES.new(KEY, AES.MODE_CFB, IV)
try:
file = fs_encode(pyfile.url.strip())
@@ -47,7 +47,6 @@ class RSDF(Container):
return
for link in binascii.unhexlify(''.join(data.split())).splitlines():
- if not link:
- link = obj.decrypt(link.decode('base64'))
- decryptedUrl = link.replace('CCF: ', '')
- self.urls.append(decryptedUrl)
+ if link:
+ link = cipher.decrypt(link.decode('base64')).replace('CCF: ', '')
+ self.urls.append(link)