From 57f2e4c05707859f6391b83d97e77b13743190d9 Mon Sep 17 00:00:00 2001 From: Arno-Nymous Date: Tue, 22 Dec 2015 03:30:54 +0100 Subject: Fix for #2207 --- module/plugins/crypter/LinkCryptWs.py | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index d849f08c2..be6200ba9 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -107,7 +107,7 @@ class LinkCryptWs(Crypter): def is_captcha_protected(self): - if 'id="captcha">' in self.data: + if ('Linkcrypt.ws // Captx' in self.data) or ('Linkcrypt.ws // TextX' in self.data): self.log_debug("Links are captcha protected") return True else: @@ -132,7 +132,7 @@ class LinkCryptWs(Crypter): def unlock_captcha_protection(self): - captcha_url = re.search(r']*?>.*?<\s*?input.*?src="(.+?)"', self.data, re.I | re.S).group(1) + captcha_url = 'http://linkcrypt.ws/captx.html?secid=id=&id=' captcha_code = self.captcha.decrypt(captcha_url, input_type="gif", output_type='positional') self.data = self.load(self.pyfile.url, post={'x': captcha_code[0], 'y': captcha_code[1]}) @@ -148,15 +148,9 @@ class LinkCryptWs(Crypter): def getunrarpw(self): - sitein = self.data - indexi = sitein.find("|source|") + 8 - indexe = sitein.find("|", indexi) - - unrarpw = sitein[indexi:indexe] - - if unrarpw not in ("Password", "Dateipasswort"): - self.log_debug("File password set to: [%s]"% unrarpw) - self.pyfile.package().password = unrarpw + # Skip password parsing, since the method was not reliable due to the scrambling of the form data. + # That way one could not predict the exact position of the password at a certain index. + return def handle_errors(self): @@ -198,8 +192,8 @@ class LinkCryptWs(Crypter): try: res = self.load("http://linkcrypt.ws/out.html", post = {'file':weblink_id}) - indexs = res.find("window.location =") + 19 - indexe = res.find('"', indexs) + indexs = res.find("var url = ") + 11 + indexe = res.find("'", indexs) link2 = res[indexs:indexe] @@ -215,7 +209,7 @@ class LinkCryptWs(Crypter): def get_container_html(self): self.container_html = [] - script = re.search(r']*?>(.*?)]*?>.*(eval.*?)\s*eval.*.*
Date: Thu, 24 Dec 2015 17:19:28 +0100 Subject: Version up + some small changes --- module/plugins/crypter/LinkCryptWs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/LinkCryptWs.py') diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index be6200ba9..9d421ad03 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -14,7 +14,7 @@ from module.plugins.internal.utils import html_unescape class LinkCryptWs(Crypter): __name__ = "LinkCryptWs" __type__ = "crypter" - __version__ = "0.14" + __version__ = "0.15" __status__ = "testing" __pattern__ = r'http://(?:www\.)?linkcrypt\.ws/(dir|container)/(?P\w+)' @@ -24,7 +24,8 @@ class LinkCryptWs(Crypter): __license__ = "GPLv3" __authors__ = [("kagenoshin", "kagenoshin[AT]gmx[DOT]ch"), ("glukgluk", None), - ("Gummibaer", None)] + ("Gummibaer", None), + ("Arno-Nymous", None)] CRYPTED_KEY = "crypted" -- cgit v1.2.3