From 2a79ebb957adf2ed610e6104fc00f7e51e835edc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 5 Jul 2014 03:21:06 +0200 Subject: Cleaned ShareLinksBiz pattern + better if-check for RSDF plugin --- module/plugins/crypter/ShareLinksBiz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 816842216..7353f30a7 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -11,7 +11,7 @@ from module.plugins.Crypter import Crypter class ShareLinksBiz(Crypter): __name__ = "ShareLinksBiz" __type__ = "crypter" - __pattern__ = r'(?Phttp://(?:www\.)?(share-links|s2l)\.biz)/(?P_?[0-9a-z]+)(/.*)?' + __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' __version__ = "1.13" __description__ = """Share-Links.biz decrypter plugin""" __author_name__ = "fragonib" @@ -64,7 +64,7 @@ class ShareLinksBiz(Crypter): if 's2l.biz' in url: url = self.load(url, just_header=True)['location'] self.baseUrl = re.match(self.__pattern__, url).group(1) - self.fileId = re.match(self.__pattern__, url).group('id') + self.fileId = re.match(self.__pattern__, url).group('ID') self.package = pyfile.package() def isOnline(self): -- cgit v1.2.3 From 2929fdd73bc247da8c2df7fc33dd2f555848fadb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 5 Jul 2014 17:56:28 +0200 Subject: [ShareLinksBiz] Fix broken pattern due last update --- module/plugins/crypter/ShareLinksBiz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 7353f30a7..bd23d4751 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -63,7 +63,7 @@ class ShareLinksBiz(Crypter): url = pyfile.url if 's2l.biz' in url: url = self.load(url, just_header=True)['location'] - self.baseUrl = re.match(self.__pattern__, url).group(1) + self.baseUrl = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1) self.fileId = re.match(self.__pattern__, url).group('ID') self.package = pyfile.package() -- cgit v1.2.3 From 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:25:41 +0200 Subject: Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics --- module/plugins/crypter/ShareLinksBiz.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index bd23d4751..4ea5955db 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -25,7 +25,6 @@ class ShareLinksBiz(Crypter): self.captcha = False def decrypt(self, pyfile): - # Init self.initFile(pyfile) @@ -111,7 +110,7 @@ class ShareLinksBiz(Crypter): # Resolve captcha href = self._resolveCoords(coords, captchaMap) - if href is None: + if not href: self.logDebug("Invalid captcha resolving, retrying") self.invalidCaptcha() self.setWait(5, False) @@ -223,7 +222,6 @@ class ShareLinksBiz(Crypter): return package_links def _getCipherParams(self): - # Request CNL2 code = re.search(r'ClicknLoad.swf\?code=(.*?)"', self.html).group(1) url = "%s/get/cnl2/%s" % (self.baseUrl, code) @@ -244,7 +242,6 @@ class ShareLinksBiz(Crypter): return crypted, jk def _getLinks(self, crypted, jk): - # Get key jreturn = self.js.eval("%s f()" % jk) self.logDebug("JsEngine returns value [%s]" % jreturn) -- 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/ShareLinksBiz.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 4ea5955db..13327dd2b 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -10,13 +10,16 @@ from module.plugins.Crypter import Crypter class ShareLinksBiz(Crypter): __name__ = "ShareLinksBiz" + __version__ = "1.13" __type__ = "crypter" + __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' - __version__ = "1.13" + __description__ = """Share-Links.biz decrypter plugin""" __author_name__ = "fragonib" __author_mail__ = "fragonib[AT]yahoo[DOT]es" + def setup(self): self.baseUrl = None self.fileId = None -- cgit v1.2.3 From 05d258d98dd8c2faf0b769840fa1e3c4acccdce8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:25:14 +0200 Subject: Fix and improve 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 --- module/plugins/crypter/ShareLinksBiz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 13327dd2b..b56f90e15 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -113,7 +113,7 @@ class ShareLinksBiz(Crypter): # Resolve captcha href = self._resolveCoords(coords, captchaMap) - if not href: + if href is None: self.logDebug("Invalid captcha resolving, retrying") self.invalidCaptcha() self.setWait(5, False) -- 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/ShareLinksBiz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index b56f90e15..87bb16a50 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -10,8 +10,8 @@ from module.plugins.Crypter import Crypter class ShareLinksBiz(Crypter): __name__ = "ShareLinksBiz" - __version__ = "1.13" __type__ = "crypter" + __version__ = "1.13" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' -- cgit v1.2.3 From 0d220d634e512d89bda540f91c643b361c82ea8a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Sep 2014 01:38:32 +0200 Subject: Logging string cosmetics --- module/plugins/crypter/ShareLinksBiz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 87bb16a50..fa9739711 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -109,7 +109,7 @@ class ShareLinksBiz(Crypter): captchaUrl = self.baseUrl + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2)) self.logDebug("Waiting user for correct position") coords = self.decryptCaptcha(captchaUrl, forceUser=True, imgtype="gif", result_type='positional') - self.logDebug("Captcha resolved, coords [%s]" % str(coords)) + self.logDebug("Captcha resolved, coords [%s]" % coords) # Resolve captcha href = self._resolveCoords(coords, captchaMap) -- 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/ShareLinksBiz.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index fa9739711..e8615d8bc 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -16,8 +16,7 @@ class ShareLinksBiz(Crypter): __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' __description__ = """Share-Links.biz decrypter plugin""" - __author_name__ = "fragonib" - __author_mail__ = "fragonib[AT]yahoo[DOT]es" + __authors__ = [("fragonib", "fragonib[AT]yahoo[DOT]es")] def setup(self): -- 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/ShareLinksBiz.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index e8615d8bc..af2e5245f 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -16,6 +16,7 @@ class ShareLinksBiz(Crypter): __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' __description__ = """Share-Links.biz decrypter plugin""" + __license__ = "GPLv3" __authors__ = [("fragonib", "fragonib[AT]yahoo[DOT]es")] -- cgit v1.2.3 From 8939f015a688a07ec7d0bd14b6a3704f6a2cb4a0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:12:40 +0200 Subject: Pattern update 3 --- module/plugins/crypter/ShareLinksBiz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index af2e5245f..9d4cfbb43 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -178,7 +178,7 @@ class ShareLinksBiz(Crypter): self.logDebug("Handling Web links") #@TODO: Gather paginated web links - pattern = r"javascript:_get\('(.*?)', \d+, ''\)" + pattern = r'javascript:_get\(\'(.*?)\', \d+, \'\'\)' ids = re.findall(pattern, self.html) self.logDebug("Decrypting %d Web links" % len(ids)) for i, ID in enumerate(ids): @@ -204,7 +204,7 @@ class ShareLinksBiz(Crypter): package_links = [] self.logDebug("Handling Container links") - pattern = r"javascript:_get\('(.*?)', 0, '(rsdf|ccf|dlc)'\)" + pattern = r'javascript:_get\(\'(.*?)\', 0, \'(rsdf|ccf|dlc)\'\)' containersLinks = re.findall(pattern, self.html) self.logDebug("Decrypting %d Container links" % len(containersLinks)) for containerLink in containersLinks: -- cgit v1.2.3 From 477120dfa8090f808ce17267896456c082714203 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 18 Oct 2014 19:09:49 +0200 Subject: Fixed logging issue with coords values --- module/plugins/crypter/ShareLinksBiz.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 9d4cfbb43..6e187ed6f 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -11,7 +11,7 @@ from module.plugins.Crypter import Crypter class ShareLinksBiz(Crypter): __name__ = "ShareLinksBiz" __type__ = "crypter" - __version__ = "1.13" + __version__ = "1.14" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' @@ -27,6 +27,7 @@ class ShareLinksBiz(Crypter): self.html = None self.captcha = False + def decrypt(self, pyfile): # Init self.initFile(pyfile) @@ -61,6 +62,7 @@ class ShareLinksBiz(Crypter): # Pack self.packages = [(package_name, package_links, package_folder)] + def initFile(self, pyfile): url = pyfile.url if 's2l.biz' in url: @@ -69,29 +71,34 @@ class ShareLinksBiz(Crypter): self.fileId = re.match(self.__pattern__, url).group('ID') self.package = pyfile.package() + def isOnline(self): if "No usable content was found" in self.html: self.logDebug("File not found") return False return True + def isPasswordProtected(self): if re.search(r'''''', self.html): self.logDebug("Links are protected") return True return False + def isCaptchaProtected(self): if '= x1 and x <= x2) and (y >= y1 and y <= y2): return href + def handleErrors(self): if "The inserted password was wrong" in self.html: self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") @@ -152,6 +163,7 @@ class ShareLinksBiz(Crypter): else: self.correctCaptcha() + def getPackageInfo(self): name = folder = None @@ -173,6 +185,7 @@ class ShareLinksBiz(Crypter): # Return package info return name, folder + def handleWebLinks(self): package_links = [] self.logDebug("Handling Web links") @@ -200,6 +213,7 @@ class ShareLinksBiz(Crypter): self.logDebug("Error decrypting Web link [%s], %s" % (ID, detail)) return package_links + def handleContainers(self): package_links = [] self.logDebug("Handling Container links") @@ -212,6 +226,7 @@ class ShareLinksBiz(Crypter): package_links.append(link) return package_links + def handleCNL2(self): package_links = [] self.logDebug("Handling CNL2 links") @@ -224,6 +239,7 @@ class ShareLinksBiz(Crypter): self.fail("Unable to decrypt CNL2 links") return package_links + def _getCipherParams(self): # Request CNL2 code = re.search(r'ClicknLoad.swf\?code=(.*?)"', self.html).group(1) @@ -244,6 +260,7 @@ class ShareLinksBiz(Crypter): # Log and return return crypted, jk + def _getLinks(self, crypted, jk): # Get key jreturn = self.js.eval("%s f()" % jk) -- cgit v1.2.3 From dabee359dd8c3870e0302e99457e6dd1bb93d736 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 21 Oct 2014 16:01:05 +0200 Subject: Remove needless self.html --- module/plugins/crypter/ShareLinksBiz.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 6e187ed6f..126a7e5dc 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -24,7 +24,6 @@ class ShareLinksBiz(Crypter): self.baseUrl = None self.fileId = None self.package = None - self.html = None self.captcha = False -- cgit v1.2.3 From 4da90891eb2544ac15a7d512aba8cb357f68ee5f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 01:11:29 +0200 Subject: Spare code cosmetics --- module/plugins/crypter/ShareLinksBiz.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 126a7e5dc..bc79c5f70 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -121,7 +121,6 @@ class ShareLinksBiz(Crypter): # Resolve captcha href = self._resolveCoords(coords, captchaMap) if href is None: - self.logDebug("Invalid captcha resolving, retrying") self.invalidCaptcha() self.setWait(5, False) self.wait() @@ -154,7 +153,6 @@ class ShareLinksBiz(Crypter): if self.captcha: if "Your choice was wrong" in self.html: - self.logDebug("Invalid captcha, retrying") self.invalidCaptcha() self.setWait(5) self.wait() @@ -168,7 +166,7 @@ class ShareLinksBiz(Crypter): # Extract from web package header title_re = r'

(.*)

' - m = re.search(title_re, self.html, re.DOTALL) + m = re.search(title_re, self.html, re.S) if m is not None: title = m.group(1).strip() if 'unnamed' not in title: @@ -202,7 +200,7 @@ class ShareLinksBiz(Crypter): fwLink = self.baseUrl + "/get/frm/" + code response = self.load(fwLink) jscode = re.search(r'', response, - re.DOTALL).group(1) + re.S).group(1) jscode = self.js.eval("f = %s" % jscode) jslauncher = "window=''; parent={frames:{Main:{location:{href:''}}},location:''}; %s; parent.frames.Main.location.href" dlLink = self.js.eval(jslauncher % jscode) -- 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/ShareLinksBiz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index bc79c5f70..8e89c98f9 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -149,7 +149,7 @@ class ShareLinksBiz(Crypter): def handleErrors(self): if "The inserted password was wrong" in self.html: self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") - self.fail("Incorrect password, please set right password on 'Edit package' form and retry") + self.fail(_("Incorrect password, please set right password on 'Edit package' form and retry")) if self.captcha: if "Your choice was wrong" in self.html: @@ -233,7 +233,7 @@ class ShareLinksBiz(Crypter): (crypted, jk) = self._getCipherParams() package_links.extend(self._getLinks(crypted, jk)) except: - self.fail("Unable to decrypt CNL2 links") + self.fail(_("Unable to decrypt CNL2 links")) return package_links -- 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/ShareLinksBiz.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 8e89c98f9..bac222d3f 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -14,6 +14,8 @@ class ShareLinksBiz(Crypter): __version__ = "1.14" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """Share-Links.biz decrypter plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 302616d94f76ab8794b58d3d54b780cc58e86b06 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 04:58:47 +0100 Subject: Code cosmetics: items() -> iteritems() --- module/plugins/crypter/ShareLinksBiz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index bac222d3f..f45aa4570 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -142,7 +142,7 @@ class ShareLinksBiz(Crypter): def _resolveCoords(self, coords, captchaMap): x, y = coords - for rect, href in captchaMap.items(): + for rect, href in captchaMap.iteritems(): x1, y1, x2, y2 = rect if (x >= x1 and x <= x2) and (y >= y1 and y <= y2): return href -- cgit v1.2.3 From 8b3589dd394d81177bf4680dddb5bdb9506b89ea Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:04:10 +0100 Subject: Update plugins to last changes --- module/plugins/crypter/ShareLinksBiz.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index f45aa4570..7c4d769c6 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -124,9 +124,7 @@ class ShareLinksBiz(Crypter): href = self._resolveCoords(coords, captchaMap) if href is None: self.invalidCaptcha() - self.setWait(5, False) - self.wait() - self.retry() + self.retry(wait_time=5) url = self.baseUrl + href self.html = self.load(url, decode=True) @@ -156,9 +154,7 @@ class ShareLinksBiz(Crypter): if self.captcha: if "Your choice was wrong" in self.html: self.invalidCaptcha() - self.setWait(5) - self.wait() - self.retry() + self.retry(wait_time=5) else: self.correctCaptcha() -- 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/ShareLinksBiz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 7c4d769c6..26d05fee1 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -9,8 +9,8 @@ from module.plugins.Crypter import Crypter class ShareLinksBiz(Crypter): - __name__ = "ShareLinksBiz" - __type__ = "crypter" + __name__ = "ShareLinksBiz" + __type__ = "crypter" __version__ = "1.14" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' @@ -18,8 +18,8 @@ class ShareLinksBiz(Crypter): ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """Share-Links.biz decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("fragonib", "fragonib[AT]yahoo[DOT]es")] + __license__ = "GPLv3" + __authors__ = [("fragonib", "fragonib[AT]yahoo[DOT]es")] def setup(self): -- cgit v1.2.3 From c9e31d875d32de31e54959b82bc35eff2b3e0f3f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 10 Nov 2014 00:19:51 +0100 Subject: Code cosmetics --- module/plugins/crypter/ShareLinksBiz.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'module/plugins/crypter/ShareLinksBiz.py') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 26d05fee1..d2e8138f6 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -192,17 +192,22 @@ class ShareLinksBiz(Crypter): for i, ID in enumerate(ids): try: self.logDebug("Decrypting Web link %d, [%s]" % (i + 1, ID)) + dwLink = self.baseUrl + "/get/lnk/" + ID - response = self.load(dwLink) - code = re.search(r'frm/(\d+)', response).group(1) + res = self.load(dwLink) + + code = re.search(r'frm/(\d+)', res).group(1) fwLink = self.baseUrl + "/get/frm/" + code - response = self.load(fwLink) - jscode = re.search(r'', response, - re.S).group(1) + res = self.load(fwLink) + + jscode = re.search(r'', res, re.S).group(1) jscode = self.js.eval("f = %s" % jscode) jslauncher = "window=''; parent={frames:{Main:{location:{href:''}}},location:''}; %s; parent.frames.Main.location.href" + dlLink = self.js.eval(jslauncher % jscode) + self.logDebug("JsEngine returns value [%s] for redirection link" % dlLink) + package_links.append(dlLink) except Exception, detail: self.logDebug("Error decrypting Web link [%s], %s" % (ID, detail)) @@ -237,10 +242,10 @@ class ShareLinksBiz(Crypter): def _getCipherParams(self): # Request CNL2 - code = re.search(r'ClicknLoad.swf\?code=(.*?)"', self.html).group(1) - url = "%s/get/cnl2/%s" % (self.baseUrl, code) - response = self.load(url) - params = response.split(";;") + code = re.search(r'ClicknLoad.swf\?code=(.*?)"', self.html).group(1) + url = "%s/get/cnl2/%s" % (self.baseUrl, code) + res = self.load(url) + params = res.split(";;") # Get jk strlist = list(base64.standard_b64decode(params[1])) -- cgit v1.2.3