From 9f816bb6dc30b94979e7c03433698b32203b9d1d Mon Sep 17 00:00:00 2001 From: NETHeader Date: Sat, 11 Oct 2014 14:51:07 +0200 Subject: New crypter SexuriaCom --- module/plugins/crypter/SexuriaCom.py | 102 +++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 module/plugins/crypter/SexuriaCom.py (limited to 'module/plugins/crypter/SexuriaCom.py') diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py new file mode 100644 index 000000000..ad99b60ec --- /dev/null +++ b/module/plugins/crypter/SexuriaCom.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- + +import re + +from module.plugins.Crypter import Crypter + + +class SexuriaCom(Crypter): + __name__ = "SexuriaCom" + __type__ = "crypter" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_\d+_\d+\.html|id=\d+\&part=\d+\&link=\d+)' + + __description__ = """Sexuria.com Crypter Plugin""" + __license__ = "GPLv3" + __authors__ = [("NETHead", "NETHead.AT.gmx.DOT.net")] + + + PATTERN_SUPPORTED_MAIN = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?Pornos_Kostenlos_.+?_(\d+)\.html', flags=re.I) + PATTERN_SUPPORTED_CRYPT = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?dl_links_\d+_(?P\d+)\.html', flags=re.I) + PATTERN_SUPPORTED_REDIRECT = re.compile(r'http://(www\.)?sexuria\.com/out\.php\?id=(?P\d+)\&part=\d+\&link=\d+', flags=re.I) + PATTERN_TITLE = re.compile(r' - (?P<TITLE>.*) Sexuria - Kostenlose Pornos - Rapidshare XXX Porn', flags=re.I) + PATTERN_PASSWORD = re.compile(r'Passwort: .*?bgcolor="#EFEFEF">(?P.*?)', flags=re.I | re.S) + PATTERN_DL_LINK_PAGE = re.compile(r'"(dl_links_\d+_\d+\.html)"', flags=re.I) + PATTERN_REDIRECT_LINKS = re.compile(r'value="(http://sexuria\.com/out\.php\?id=\d+\&part=\d+\&link=\d+)" readonly', flags=re.I) + + + def setup(self): + self.html = None + + + def decrypt(self, pyfile): + # Init + self.pyfile = pyfile + self.package = pyfile.package() + + # Get package links + (package_name, package_links, folder_name, package_pwd) = self.decryptLinks(self.pyfile.url) + if package_pwd: + self.pyfile.package().password = package_pwd + self.packages.append((package_name, package_links, folder_name)) + + + def decryptLinks(self, url): + linklist = [] + name = self.package.name + folder = self.package.folder + password = None + + if re.match(self.PATTERN_SUPPORTED_MAIN, url): + # Processing main page + html = self.load(url) + links = re.findall(self.PATTERN_DL_LINK_PAGE, html) + for link in links: + linklist.append("http://sexuria.com/v1/" + link) + + elif re.match(self.PATTERN_SUPPORTED_REDIRECT, url): + # Processing direct redirect link (out.php), redirecting to main page + id = re.search(self.PATTERN_SUPPORTED_REDIRECT, url).group('ID') + if id: + linklist.append("http://sexuria.com/v1/Pornos_Kostenlos_liebe_%s.html" % id) + + elif re.match(self.PATTERN_SUPPORTED_CRYPT, url): + # Extract info from main file + id = re.search(self.PATTERN_SUPPORTED_CRYPT, url).group('ID') + html = self.load("http://sexuria.com/v1/Pornos_Kostenlos_info_%s.html" % id, decode=True) + + title = re.search(self.PATTERN_TITLE, html).group('TITLE').strip() + if title: + name = folder = title + self.logDebug("Package info found, name [%s] and folder [%s]" % (name, folder)) + + pwd = re.search(self.PATTERN_PASSWORD, html).group('PWD') + if pwd: + password = pwd.strip() + self.logDebug("Password info [%s] found" % password) + + # Process link (dl_link) + html = self.load(url) + links = re.findall(self.PATTERN_REDIRECT_LINKS, html) + if len(links) == 0: + self.LogError("Broken for link %s" % link) + else: + for link in links: + link = link.replace("http://sexuria.com/", "http://www.sexuria.com/") + finallink = self.load(link, just_header=True)['location'] + if not finallink or "sexuria.com/" in finallink: + self.LogError("Broken for link %s" % link) + else: + linklist.append(finallink) + + # Inform the user if no link could been extracted + if linklist == []: + self.fail("Could not extract any links (out of date?)") + + # Debug log + self.logDebug("%d supported links" % len(linklist)) + for i, link in enumerate(linklist): + self.logDebug("Supported link %d, %s" % (i + 1, link)) + + return name, linklist, folder, password -- cgit v1.2.3 From e600362d2450ef13567b255004861bead011e0ef Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:03:26 +0200 Subject: [FileshareInUa] Mark dead --- module/plugins/crypter/SexuriaCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/SexuriaCom.py') diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index ad99b60ec..c7939e332 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -12,7 +12,7 @@ class SexuriaCom(Crypter): __pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_\d+_\d+\.html|id=\d+\&part=\d+\&link=\d+)' - __description__ = """Sexuria.com Crypter Plugin""" + __description__ = """Sexuria.com decrypter plugin""" __license__ = "GPLv3" __authors__ = [("NETHead", "NETHead.AT.gmx.DOT.net")] -- cgit v1.2.3 From 1f48f481740863c7697064bde286a78e977e4a1b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Oct 2014 15:12:06 +0200 Subject: Update other plugins to support self.error --- module/plugins/crypter/SexuriaCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/SexuriaCom.py') diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index c7939e332..55b6adef4 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -92,7 +92,7 @@ class SexuriaCom(Crypter): # Inform the user if no link could been extracted if linklist == []: - self.fail("Could not extract any links (out of date?)") + self.error("Could not extract any links") # Debug log self.logDebug("%d supported links" % len(linklist)) -- 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/SexuriaCom.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'module/plugins/crypter/SexuriaCom.py') diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index 55b6adef4..68a404f46 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -26,10 +26,6 @@ class SexuriaCom(Crypter): PATTERN_REDIRECT_LINKS = re.compile(r'value="(http://sexuria\.com/out\.php\?id=\d+\&part=\d+\&link=\d+)" readonly', flags=re.I) - def setup(self): - self.html = None - - def decrypt(self, pyfile): # Init self.pyfile = pyfile -- 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/SexuriaCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/SexuriaCom.py') diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index 68a404f46..6b9b2c5f6 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -88,7 +88,7 @@ class SexuriaCom(Crypter): # Inform the user if no link could been extracted if linklist == []: - self.error("Could not extract any links") + self.error(_("Could not extract any links")) # Debug log self.logDebug("%d supported links" % len(linklist)) -- cgit v1.2.3 From aa0751bcfd995e308bcd586a6965c75e68b1274b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 27 Oct 2014 23:05:13 +0100 Subject: Code cosmetics --- module/plugins/crypter/SexuriaCom.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'module/plugins/crypter/SexuriaCom.py') diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index 6b9b2c5f6..20559e9d7 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -86,10 +86,6 @@ class SexuriaCom(Crypter): else: linklist.append(finallink) - # Inform the user if no link could been extracted - if linklist == []: - self.error(_("Could not extract any links")) - # Debug log self.logDebug("%d supported links" % len(linklist)) for i, link in enumerate(linklist): -- 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/SexuriaCom.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/crypter/SexuriaCom.py') diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index 20559e9d7..c086a86ff 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -11,6 +11,8 @@ class SexuriaCom(Crypter): __version__ = "0.01" __pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_\d+_\d+\.html|id=\d+\&part=\d+\&link=\d+)' + __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), + ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """Sexuria.com decrypter plugin""" __license__ = "GPLv3" -- 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/SexuriaCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/SexuriaCom.py') diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index c086a86ff..6166c2023 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -6,8 +6,8 @@ from module.plugins.Crypter import Crypter class SexuriaCom(Crypter): - __name__ = "SexuriaCom" - __type__ = "crypter" + __name__ = "SexuriaCom" + __type__ = "crypter" __version__ = "0.01" __pattern__ = r'http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_\d+_\d+\.html|id=\d+\&part=\d+\&link=\d+)' @@ -15,8 +15,8 @@ class SexuriaCom(Crypter): ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """Sexuria.com decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("NETHead", "NETHead.AT.gmx.DOT.net")] + __license__ = "GPLv3" + __authors__ = [("NETHead", "NETHead.AT.gmx.DOT.net")] PATTERN_SUPPORTED_MAIN = re.compile(r'http://(www\.)?sexuria\.com/(v1/)?Pornos_Kostenlos_.+?_(\d+)\.html', flags=re.I) -- cgit v1.2.3 From ae15749449563f5adaabd250ea62460c18af6498 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 3 Nov 2014 12:16:40 +0100 Subject: Update crypters --- module/plugins/crypter/SexuriaCom.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/SexuriaCom.py') diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py index 6166c2023..3c952fd6b 100644 --- a/module/plugins/crypter/SexuriaCom.py +++ b/module/plugins/crypter/SexuriaCom.py @@ -34,10 +34,8 @@ class SexuriaCom(Crypter): self.package = pyfile.package() # Get package links - (package_name, package_links, folder_name, package_pwd) = self.decryptLinks(self.pyfile.url) - if package_pwd: - self.pyfile.package().password = package_pwd - self.packages.append((package_name, package_links, folder_name)) + package_name, self.links, folder_name, package_pwd = self.decryptLinks(self.pyfile.url) + self.packages = [(package_name, self.links, folder_name)] def decryptLinks(self, url): -- cgit v1.2.3