From b8bc5ecae9de0eb2bc6f6310d024ecc2fc845c84 Mon Sep 17 00:00:00 2001 From: Nold360 Date: Tue, 16 Apr 2013 10:02:52 +0200 Subject: Added Workaround for duplicate links in NCryptIn --- module/plugins/crypter/NCryptIn.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'module/plugins') diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 996ff581e..0d0a884cf 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -51,6 +51,7 @@ class NCryptIn(Crypter): package_links.extend(self.handleWebLinks()) package_links.extend(self.handleContainers()) package_links.extend(self.handleCNL2()) + package_links = self.removeContainers(package_links) package_links = set(package_links) self.logDebug(package_links) @@ -67,6 +68,19 @@ class NCryptIn(Crypter): content = re.sub(rexpr, "", content) return content + def removeContainers(self,package_links): + tmp_package_links = package_links[:] + for link in tmp_package_links: + self.logDebug(link) + if ".dlc" in link or ".ccf" in link or ".rsdf" in link: + self.logDebug("Removing [%s] from package_links" % link) + package_links.remove(link) + + if len(package_links) > 0: + return package_links + else: + return tmp_package_links + def isOnline(self): if "Your folder does not exist" in self.cleanedHtml: self.logDebug("File not found") @@ -123,7 +137,7 @@ class NCryptIn(Crypter): postData['recaptcha_challenge_field'] = challenge postData['recaptcha_response_field'] = code - # Resolve circlecaptcha + # Resolve anicaptcha if "circlecaptcha" in form: self.captcha = True self.logDebug("Captcha protected") -- cgit v1.2.3