From 878c3c93f3b7816ad67008afbe2b9b6367f3980b Mon Sep 17 00:00:00 2001 From: z00nx 0 Date: Thu, 26 Sep 2013 13:36:03 +1000 Subject: Initial XupPl decrypter --- module/plugins/crypter/XupPl.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 module/plugins/crypter/XupPl.py (limited to 'module') diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py new file mode 100644 index 000000000..dbe38aede --- /dev/null +++ b/module/plugins/crypter/XupPl.py @@ -0,0 +1,18 @@ +from module.plugins.Crypter import Crypter + + +class XupPl(Crypter): + __name__ = "XupPl" + __type__ = "crypter" + __pattern__ = r"http(?:s)?://.*\.xup\.pl/.*" + __version__ = "0.1" + __description__ = """Xup.pl Crypter Plugin""" + __author_name__ = ("z00nx") + __author_mail__ = ("z00nx0@gmail.com") + + def decrypt(self, pyfile): + header = self.load(self.pyfile.url, just_header=True) + if 'location' in header: + self.core.files.addLinks([header['location']], self.pyfile.package().id) + else: + self.fail('Unable to find link') -- cgit v1.2.3 From 99f5f8468be9a7b0f06b0d3b46e6490c55b9a534 Mon Sep 17 00:00:00 2001 From: z00nx 0 Date: Thu, 26 Sep 2013 20:36:58 +1000 Subject: Fixed URL regex --- module/plugins/crypter/XupPl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/plugins/crypter/XupPl.py b/module/plugins/crypter/XupPl.py index dbe38aede..09832f037 100644 --- a/module/plugins/crypter/XupPl.py +++ b/module/plugins/crypter/XupPl.py @@ -4,7 +4,7 @@ from module.plugins.Crypter import Crypter class XupPl(Crypter): __name__ = "XupPl" __type__ = "crypter" - __pattern__ = r"http(?:s)?://.*\.xup\.pl/.*" + __pattern__ = r"https?://.*\.xup\.pl/.*" __version__ = "0.1" __description__ = """Xup.pl Crypter Plugin""" __author_name__ = ("z00nx") -- cgit v1.2.3