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/LinkdecrypterCom.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'module/plugins/crypter/LinkdecrypterCom.py') diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index a6e6faa40..1ec396962 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -13,8 +13,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . - - @author: zoidberg """ import re -- 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/LinkdecrypterCom.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'module/plugins/crypter/LinkdecrypterCom.py') diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 1ec396962..96fe11951 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -21,8 +21,11 @@ from module.plugins.Crypter import Crypter class LinkdecrypterCom(Crypter): __name__ = "LinkdecrypterCom" - __type__ = "crypter" __version__ = "0.27" + __type__ = "crypter" + + __pattern__ = None + __description__ = """Linkdecrypter.com""" __author_name__ = ("zoidberg", "flowlee") __author_mail__ = ("zoidberg@mujmail.cz", "") @@ -32,6 +35,7 @@ class LinkdecrypterCom(Crypter): CAPTCHA_PATTERN = r'' REDIR_PATTERN = r'(Click here if your browser does not redirect you).' + def decrypt(self, pyfile): self.passwords = self.getPassword().splitlines() -- cgit v1.2.3 From a1e78f33dc2b0b6777fdcbc415673f3965b25542 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 16 Jul 2014 00:46:26 +0200 Subject: Prefer self.urls and self.packages for adding links --- module/plugins/crypter/LinkdecrypterCom.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/LinkdecrypterCom.py') diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 96fe11951..31c4d36b7 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -41,10 +41,8 @@ class LinkdecrypterCom(Crypter): self.passwords = self.getPassword().splitlines() # API not working anymore - new_links = self.decryptHTML() - if new_links: - self.core.files.addLinks(new_links, pyfile.package().id) - else: + self.urls = self.decryptHTML() + if not self.urls: self.fail('Could not extract any links') def decryptAPI(self): -- cgit v1.2.3 From 9395182da7afed55a29bde1c7cbefe4204e783f0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:02:09 +0200 Subject: Store all re.search/match object as "m" instead "found" --- module/plugins/crypter/LinkdecrypterCom.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'module/plugins/crypter/LinkdecrypterCom.py') diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 31c4d36b7..2671c19c6 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -72,17 +72,17 @@ class LinkdecrypterCom(Crypter): self.html = self.load('http://linkdecrypter.com/', post=post_dict, cookies=True, decode=True) while self.passwords or retries: - found = re.search(self.TEXTAREA_PATTERN, self.html, flags=re.DOTALL) - if found: - return [x for x in found.group(1).splitlines() if '[LINK-ERROR]' not in x] + m = re.search(self.TEXTAREA_PATTERN, self.html, flags=re.DOTALL) + if m: + return [x for x in m.group(1).splitlines() if '[LINK-ERROR]' not in x] - found = re.search(self.CAPTCHA_PATTERN, self.html) - if found: - captcha_url = 'http://linkdecrypter.com/' + found.group(1) - result_type = "positional" if "getPos" in found.group(2) else "textual" + m = re.search(self.CAPTCHA_PATTERN, self.html) + if m: + captcha_url = 'http://linkdecrypter.com/' + m.group(1) + result_type = "positional" if "getPos" in m.group(2) else "textual" - found = re.search(r"

([^<]+)

", self.html) - msg = found.group(1) if found else "" + m = re.search(r"

([^<]+)

", self.html) + msg = m.group(1) if m else "" self.logInfo("Captcha protected link", result_type, msg) captcha = self.decryptCaptcha(captcha_url, result_type=result_type) -- 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/LinkdecrypterCom.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'module/plugins/crypter/LinkdecrypterCom.py') diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 2671c19c6..21f05b962 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -1,28 +1,13 @@ # -*- coding: utf-8 -*- -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . -""" - import re from module.plugins.Crypter import Crypter class LinkdecrypterCom(Crypter): __name__ = "LinkdecrypterCom" - __version__ = "0.27" __type__ = "crypter" + __version__ = "0.27" __pattern__ = None -- cgit v1.2.3