diff options
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r-- | module/plugins/crypter/Dereferer.py | 33 | ||||
-rw-r--r-- | module/plugins/crypter/DontKnowMe.py | 17 | ||||
-rw-r--r-- | module/plugins/crypter/FilecryptCc.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/NCryptIn.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/SafelinkingNet.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/TinyurlCom.py | 23 |
6 files changed, 59 insertions, 26 deletions
diff --git a/module/plugins/crypter/Dereferer.py b/module/plugins/crypter/Dereferer.py index 8427c1540..8e56a7bfc 100644 --- a/module/plugins/crypter/Dereferer.py +++ b/module/plugins/crypter/Dereferer.py @@ -6,12 +6,39 @@ from module.plugins.internal.SimpleDereferer import SimpleDereferer class Dereferer(SimpleDereferer): __name__ = "Dereferer" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" - __pattern__ = r'https?://([^/]+)/.*?(?P<LINK>(ht|f)tps?(://|%3A%2F%2F).+)' + __pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/.*?(?P<LINK>(?:ht|f)tps?://.+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] __description__ = """Crypter for dereferers""" __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + + + HOSTER_DOMAIN = None + HOSTER_NAME = None + + + def _log(self, type, args): + msg = " | ".join(str(a).strip() for a in args if a) + logger = getattr(self.log, type) + logger("%s: %s: %s" % (self.__name__, self.HOSTER_NAME, msg or _("%s MARK" % type.upper()))) + + + def init(self): + super(Dereferer, self).init() + + self.__pattern__ = self.core.pluginManager.crypterPlugins[self.__name__]['pattern'] #@TODO: Recheck in 0.4.10 + + self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group("DOMAIN").lower() + self.HOSTER_NAME = "".join(part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.') + + + def getLink(self): + try: + return re.match(self.__pattern__, pyfile.url).group('LINK').strip() + + except Exception, e: + self.logWarning(e) diff --git a/module/plugins/crypter/DontKnowMe.py b/module/plugins/crypter/DontKnowMe.py deleted file mode 100644 index e56751972..000000000 --- a/module/plugins/crypter/DontKnowMe.py +++ /dev/null @@ -1,17 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.SimpleDereferer import SimpleDereferer - - -class DontKnowMe(SimpleDereferer): - __name__ = "DontKnowMe" - __type__ = "crypter" - __version__ = "0.11" - - __pattern__ = r'http://(?:www\.)?dontknow\.me/at/\?(?P<LINK>.+)' - __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), - ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)] - - __description__ = """DontKnow.me decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("selaux", "")] diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index a1a94b6f6..4d2b42f90 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -10,13 +10,13 @@ import urlparse from Crypto.Cipher import AES from module.plugins.Crypter import Crypter -from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.ReCaptcha import ReCaptcha class FilecryptCc(Crypter): __name__ = "FilecryptCc" __type__ = "crypter" - __version__ = "0.14" + __version__ = "0.15" __pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+' diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 8ceb9d3c8..593e9b506 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -6,13 +6,13 @@ import re from Crypto.Cipher import AES from module.plugins.Crypter import Crypter -from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.ReCaptcha import ReCaptcha class NCryptIn(Crypter): __name__ = "NCryptIn" __type__ = "crypter" - __version__ = "1.34" + __version__ = "1.35" __pattern__ = r'http://(?:www\.)?ncrypt\.in/(?P<TYPE>folder|link|frame)-([^/\?]+)' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index 7f0915065..5d822af11 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -6,13 +6,13 @@ from BeautifulSoup import BeautifulSoup from module.common.json_layer import json_loads from module.plugins.Crypter import Crypter -from module.plugins.internal.CaptchaService import SolveMedia +from module.plugins.internal.SolveMedia import SolveMedia class SafelinkingNet(Crypter): __name__ = "SafelinkingNet" __type__ = "crypter" - __version__ = "0.14" + __version__ = "0.15" __pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), diff --git a/module/plugins/crypter/TinyurlCom.py b/module/plugins/crypter/TinyurlCom.py new file mode 100644 index 000000000..4b5b35457 --- /dev/null +++ b/module/plugins/crypter/TinyurlCom.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +from module.plugins.internal.SimpleDereferer import SimpleDereferer, create_getInfo + + +class TinyurlCom(SimpleDereferer): + __name__ = "TinyurlCom" + __type__ = "crypter" + __version__ = "0.01" + + __pattern__ = r'https?://(?:www\.)?(preview\.)?tinyurl\.com/[\w-]+' + + __description__ = """Tinyurl.com decrypter plugin""" + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] + + + URL_REPLACEMENTS = [(r'preview\.', r'')] + + OFFLINE_PATTERN = r">Error: Unable to find site's URL to redirect to" + + +getInfo = create_getInfo(TinyurlCom) |