From 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 10 Jul 2014 03:02:26 +0200 Subject: Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics --- module/plugins/crypter/DlProtectCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index dbe5bf705..780708884 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -32,7 +32,7 @@ class DlProtectCom(SimpleCrypter): __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" - OFFLINE_PATTERN = ">Unfortunately, the link you are looking for is not found" + OFFLINE_PATTERN = r'>Unfortunately, the link you are looking for is not found' def getLinks(self): # Direct link with redirect -- cgit v1.2.3 From 48c0c42fd6faffc56432d5f037cd575979f180cc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 02:23:37 +0200 Subject: Removed all @author flags + key attributes cleanup for internal & hooks plugins --- module/plugins/crypter/DlProtectCom.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 780708884..f9214f0c8 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -12,8 +12,6 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -# -# @author: Walter Purcaro ############################################################################### import re -- cgit v1.2.3 From 7b8c458cca7d21a029620f98e453f746fce69cd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 16:10:01 +0200 Subject: Prefer single quote for dict key name --- module/plugins/crypter/DlProtectCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index f9214f0c8..5ef8eab21 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -53,14 +53,14 @@ class DlProtectCom(SimpleCrypter): post_req.update({"i": b64time, "submitform": "Decrypt+link"}) if ">Password :" in self.html: - post_req["pwd"] = self.getPassword() + post_req['pwd'] = self.getPassword() if ">Security Code" in self.html: captcha_id = re.search(r'/captcha\.php\?uid=(.+?)"', self.html).group(1) captcha_url = "http://www.dl-protect.com/captcha.php?uid=" + captcha_id captcha_code = self.decryptCaptcha(captcha_url, imgtype="gif") - post_req["secure"] = captcha_code + post_req['secure'] = captcha_code self.html = self.load(self.pyfile.url, post=post_req) -- cgit v1.2.3 From 8e47b0de30a25d0fd5dfb518bfe4e1e7beff93fd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:27:44 +0200 Subject: Key attributes cleanup for account, container and crypter plugins --- module/plugins/crypter/DlProtectCom.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 5ef8eab21..6bd6bc5b5 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -15,6 +15,7 @@ ############################################################################### import re + from base64 import urlsafe_b64encode from time import time @@ -23,15 +24,18 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter class DlProtectCom(SimpleCrypter): __name__ = "DlProtectCom" + __version__ = "0.01" __type__ = "crypter" + __pattern__ = r'http://(?:www\.)?dl-protect\.com/((en|fr)/)?(?P\w+)' - __version__ = "0.01" + __description__ = """Dl-protect.com decrypter plugin""" __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" OFFLINE_PATTERN = r'>Unfortunately, the link you are looking for is not found' + def getLinks(self): # Direct link with redirect if not re.match(r"http://(?:www\.)?dl-protect\.com", self.req.http.lastEffectiveURL): -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/crypter/DlProtectCom.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 6bd6bc5b5..4c958437a 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -1,18 +1,4 @@ # -*- coding: utf-8 -*- -############################################################################### -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -############################################################################### import re @@ -24,8 +10,8 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter class DlProtectCom(SimpleCrypter): __name__ = "DlProtectCom" - __version__ = "0.01" __type__ = "crypter" + __version__ = "0.01" __pattern__ = r'http://(?:www\.)?dl-protect\.com/((en|fr)/)?(?P\w+)' -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/crypter/DlProtectCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 4c958437a..f748b5e62 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -16,8 +16,8 @@ class DlProtectCom(SimpleCrypter): __pattern__ = r'http://(?:www\.)?dl-protect\.com/((en|fr)/)?(?P\w+)' __description__ = """Dl-protect.com decrypter plugin""" - __author_name__ = "Walter Purcaro" - __author_mail__ = "vuolter@gmail.com" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + OFFLINE_PATTERN = r'>Unfortunately, the link you are looking for is not found' -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/crypter/DlProtectCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index f748b5e62..e31c62185 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -16,6 +16,7 @@ class DlProtectCom(SimpleCrypter): __pattern__ = r'http://(?:www\.)?dl-protect\.com/((en|fr)/)?(?P\w+)' __description__ = """Dl-protect.com decrypter plugin""" + __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/crypter/DlProtectCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index e31c62185..4b5f8fc95 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -57,7 +57,7 @@ class DlProtectCom(SimpleCrypter): for errmsg in (">The password is incorrect", ">The security code is incorrect"): if errmsg in self.html: - self.fail(errmsg[1:]) + self.fail(_(errmsg[1:])) pattern = r'' return re.findall(pattern, self.html) -- cgit v1.2.3 From 885f8ed782e64d9e73367905e642a84d0a8999f1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 04:01:38 +0100 Subject: Update __config__ --- module/plugins/crypter/DlProtectCom.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 4b5f8fc95..40bf521a8 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -14,6 +14,8 @@ class DlProtectCom(SimpleCrypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?dl-protect\.com/((en|fr)/)?(?P\w+)' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """Dl-protect.com decrypter plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/crypter/DlProtectCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 40bf521a8..5efb03c15 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -9,8 +9,8 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter class DlProtectCom(SimpleCrypter): - __name__ = "DlProtectCom" - __type__ = "crypter" + __name__ = "DlProtectCom" + __type__ = "crypter" __version__ = "0.01" __pattern__ = r'http://(?:www\.)?dl-protect\.com/((en|fr)/)?(?P\w+)' @@ -18,8 +18,8 @@ class DlProtectCom(SimpleCrypter): ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """Dl-protect.com decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] OFFLINE_PATTERN = r'>Unfortunately, the link you are looking for is not found' -- cgit v1.2.3 From 0f530be2642c63759cb6156866f1d4ab119760da Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 12 Dec 2014 20:33:34 +0100 Subject: Fix missing create_getInfo --- module/plugins/crypter/DlProtectCom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 5efb03c15..0f59e925e 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -5,7 +5,7 @@ import re from base64 import urlsafe_b64encode from time import time -from module.plugins.internal.SimpleCrypter import SimpleCrypter +from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DlProtectCom(SimpleCrypter): @@ -63,3 +63,6 @@ class DlProtectCom(SimpleCrypter): pattern = r'' return re.findall(pattern, self.html) + + +getInfo = create_getInfo(DlProtectCom) -- cgit v1.2.3 From 854efeb463bd98cb8e22f1f78f5ce97e6c0ab49f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 22 Dec 2014 16:45:04 +0100 Subject: Spare code cosmetics --- module/plugins/crypter/DlProtectCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/DlProtectCom.py') diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 0f59e925e..a99ed0be9 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -30,7 +30,7 @@ class DlProtectCom(SimpleCrypter): if not re.match(r"http://(?:www\.)?dl-protect\.com", self.req.http.lastEffectiveURL): return [self.req.http.lastEffectiveURL] - #id = re.match(self.__pattern__, self.pyfile.url).group("ID") + #id = re.match(self.__pattern__, self.pyfile.url).group('ID') key = re.search(r'name="id_key" value="(.+?)"', self.html).group(1) post_req = {"id_key": key, "submitform": ""} -- cgit v1.2.3