diff options
Diffstat (limited to 'pyload/plugins/container')
-rw-r--r-- | pyload/plugins/container/CCF.py | 43 | ||||
-rw-r--r-- | pyload/plugins/container/DLC_25.pyc | bin | 0 -> 8340 bytes | |||
-rw-r--r-- | pyload/plugins/container/DLC_26.pyc | bin | 0 -> 8313 bytes | |||
-rw-r--r-- | pyload/plugins/container/DLC_27.pyc | bin | 0 -> 8237 bytes | |||
-rw-r--r-- | pyload/plugins/container/LinkList.py | 73 | ||||
-rw-r--r-- | pyload/plugins/container/RSDF.py | 51 | ||||
-rw-r--r-- | pyload/plugins/container/__init__.py | 0 |
7 files changed, 167 insertions, 0 deletions
diff --git a/pyload/plugins/container/CCF.py b/pyload/plugins/container/CCF.py new file mode 100644 index 000000000..db6588068 --- /dev/null +++ b/pyload/plugins/container/CCF.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- + +import re + +from os import makedirs +from os.path import exists +from urllib2 import build_opener + +from MultipartPostHandler import MultipartPostHandler + +from pyload.plugins.base.Container import Container +from pyload.utils import safe_join + + +class CCF(Container): + __name__ = "CCF" + __version__ = "0.2" + + __pattern__ = r'.+\.ccf' + + __description__ = """CCF container decrypter plugin""" + __author_name__ = "Willnix" + __author_mail__ = "Willnix@pyload.org" + + + def decrypt(self, pyfile): + + infile = pyfile.url.replace("\n", "") + + opener = build_opener(MultipartPostHandler) + params = {"src": "ccf", + "filename": "test.ccf", + "upload": open(infile, "rb")} + tempdlc_content = opener.open('http://service.jdownloader.net/dlcrypt/getDLC.php', params).read() + + download_folder = self.config['general']['download_folder'] + + tempdlc_name = safe_join(download_folder, "tmp_%s.dlc" % pyfile.name) + tempdlc = open(tempdlc_name, "w") + tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.DOTALL).group(1)) + tempdlc.close() + + self.urls = [tempdlc_name] diff --git a/pyload/plugins/container/DLC_25.pyc b/pyload/plugins/container/DLC_25.pyc Binary files differnew file mode 100644 index 000000000..b8fde0051 --- /dev/null +++ b/pyload/plugins/container/DLC_25.pyc diff --git a/pyload/plugins/container/DLC_26.pyc b/pyload/plugins/container/DLC_26.pyc Binary files differnew file mode 100644 index 000000000..41a4e0cb8 --- /dev/null +++ b/pyload/plugins/container/DLC_26.pyc diff --git a/pyload/plugins/container/DLC_27.pyc b/pyload/plugins/container/DLC_27.pyc Binary files differnew file mode 100644 index 000000000..a6bffaf74 --- /dev/null +++ b/pyload/plugins/container/DLC_27.pyc diff --git a/pyload/plugins/container/LinkList.py b/pyload/plugins/container/LinkList.py new file mode 100644 index 000000000..0acdd2983 --- /dev/null +++ b/pyload/plugins/container/LinkList.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- + +import codecs + +from pyload.plugins.base.Container import Container +from pyload.utils import fs_encode + + +class LinkList(Container): + __name__ = "LinkList" + __version__ = "0.12" + + __pattern__ = r'.+\.txt' + __config__ = [("clear", "bool", "Clear Linklist after adding", False), + ("encoding", "string", "File encoding (default utf-8)", "")] + + __description__ = """Read link lists in txt format""" + __author_name__ = ("spoob", "jeix") + __author_mail__ = ("spoob@pyload.org", "jeix@hasnomail.com") + + + def decrypt(self, pyfile): + try: + file_enc = codecs.lookup(self.getConfig("encoding")).name + except: + file_enc = "utf-8" + + print repr(pyfile.url) + print pyfile.url + + file_name = fs_encode(pyfile.url) + + txt = codecs.open(file_name, 'r', file_enc) + links = txt.readlines() + curPack = "Parsed links from %s" % pyfile.name + + packages = {curPack:[],} + + for link in links: + link = link.strip() + if not link: + continue + + if link.startswith(";"): + continue + if link.startswith("[") and link.endswith("]"): + # new package + curPack = link[1:-1] + packages[curPack] = [] + continue + packages[curPack].append(link) + txt.close() + + # empty packages fix + + delete = [] + + for key,value in packages.iteritems(): + if not value: + delete.append(key) + + for key in delete: + del packages[key] + + if self.getConfig("clear"): + try: + txt = open(file_name, 'wb') + txt.close() + except: + self.logWarning(_("LinkList could not be cleared.")) + + for name, links in packages.iteritems(): + self.packages.append((name, links, name)) diff --git a/pyload/plugins/container/RSDF.py b/pyload/plugins/container/RSDF.py new file mode 100644 index 000000000..3175516cf --- /dev/null +++ b/pyload/plugins/container/RSDF.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- + +import base64 +import binascii +import re + +from pyload.plugins.base.Container import Container + + +class RSDF(Container): + __name__ = "RSDF" + __version__ = "0.22" + + __pattern__ = r'.+\.rsdf' + + __description__ = """RSDF container decrypter plugin""" + __author_name__ = ("RaNaN", "spoob") + __author_mail__ = ("RaNaN@pyload.org", "spoob@pyload.org") + + + def decrypt(self, pyfile): + + from Crypto.Cipher import AES + + infile = pyfile.url.replace("\n", "") + Key = binascii.unhexlify('8C35192D964DC3182C6F84F3252239EB4A320D2500000000') + + IV = binascii.unhexlify('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF') + IV_Cipher = AES.new(Key, AES.MODE_ECB) + IV = IV_Cipher.encrypt(IV) + + obj = AES.new(Key, AES.MODE_CFB, IV) + + rsdf = open(infile, 'r') + + data = rsdf.read() + rsdf.close() + + if re.search(r"<title>404 - Not Found</title>", data) is None: + data = binascii.unhexlify(''.join(data.split())) + data = data.splitlines() + + for link in data: + if not link: + continue + link = base64.b64decode(link) + link = obj.decrypt(link) + decryptedUrl = link.replace('CCF: ', '') + self.urls.append(decryptedUrl) + + self.log.debug("%s: adding package %s with %d links" % (self.__name__,pyfile.package().name,len(links))) diff --git a/pyload/plugins/container/__init__.py b/pyload/plugins/container/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pyload/plugins/container/__init__.py |