From e706acebd1b8ae5152987ea6cba447f19e75da93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20M=C3=B6llers?= Date: Tue, 9 Jun 2015 01:06:53 +0200 Subject: New Crypter plugin: pasted.co Pasted.co is a pastebin service. It can be used to host a list of download links which pyLoad could use. The plugin bypasses the (ineffective) captcha request and fetches the contents of the paste. It keeps the original package's name and folder and just inserts the links from the paste. --- module/plugins/crypter/PastedCo.py | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 module/plugins/crypter/PastedCo.py (limited to 'module/plugins/crypter/PastedCo.py') diff --git a/module/plugins/crypter/PastedCo.py b/module/plugins/crypter/PastedCo.py new file mode 100644 index 000000000..8236345cc --- /dev/null +++ b/module/plugins/crypter/PastedCo.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.Crypter import Crypter + +import re + + +class PastedCo(Crypter): + __name__ = "PastedCo" + __type__ = "crypter" + __version__ = "0.01" + + __pattern__ = r'http://pasted\.co/\w+' + + __description__ = """Pasted.co decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("Frederik Möllers", "fred-public@posteo.de")] + + + NAME_PATTERN = r'(?P<N>.+?) - .+' + NAME_PATTERN = r"'save_paste' href=\"(http://pasted.co/[0-9a-f]+)/info" + + FS_URL_PREFIX = '
'
+    FS_URL_SUFFIX = '
' + + def decrypt(self, pyfile): + package = pyfile.package() + package_name = package.name + package_folder = package.folder + html = self.load(pyfile.url, decode = True).splitlines() + fs_url = None + FS_URL_RE = re.compile('%s/fullscreen\.php\?hash=[0-9a-f]*' % pyfile.url) + for line in html: + match = FS_URL_RE.search(line) + if match: + fs_url = match.group() + break + if not fs_url: + raise Exception("Could not find pasted.co fullscreen URL!") + urls = self.load(fs_url, decode = True) + urls = urls[urls.find(PastedCo.FS_URL_PREFIX) + len(PastedCo.FS_URL_PREFIX):] + urls = urls[:urls.find(PastedCo.FS_URL_SUFFIX)].splitlines() + self.packages.append((package_name, urls, package_folder)) -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/crypter/PastedCo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/PastedCo.py') diff --git a/module/plugins/crypter/PastedCo.py b/module/plugins/crypter/PastedCo.py index 8236345cc..50bcadaba 100644 --- a/module/plugins/crypter/PastedCo.py +++ b/module/plugins/crypter/PastedCo.py @@ -8,7 +8,7 @@ import re class PastedCo(Crypter): __name__ = "PastedCo" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'http://pasted\.co/\w+' -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/crypter/PastedCo.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/crypter/PastedCo.py') diff --git a/module/plugins/crypter/PastedCo.py b/module/plugins/crypter/PastedCo.py index 50bcadaba..ec0989044 100644 --- a/module/plugins/crypter/PastedCo.py +++ b/module/plugins/crypter/PastedCo.py @@ -9,6 +9,7 @@ class PastedCo(Crypter): __name__ = "PastedCo" __type__ = "crypter" __version__ = "0.02" + __status__ = "stable" __pattern__ = r'http://pasted\.co/\w+' -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/crypter/PastedCo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/PastedCo.py') diff --git a/module/plugins/crypter/PastedCo.py b/module/plugins/crypter/PastedCo.py index ec0989044..0804f56d4 100644 --- a/module/plugins/crypter/PastedCo.py +++ b/module/plugins/crypter/PastedCo.py @@ -9,7 +9,7 @@ class PastedCo(Crypter): __name__ = "PastedCo" __type__ = "crypter" __version__ = "0.02" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'http://pasted\.co/\w+' -- cgit v1.2.3