summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/CloudzillaToFolder.py4
-rw-r--r--module/plugins/crypter/DevhostStFolder.py2
-rw-r--r--module/plugins/crypter/FilecryptCc.py7
-rwxr-xr-x[-rw-r--r--]module/plugins/crypter/Go4UpCom.py33
-rw-r--r--module/plugins/crypter/GoogledriveComFolder.py4
-rw-r--r--module/plugins/crypter/LinkCryptWs.py17
-rw-r--r--module/plugins/crypter/MultiUpOrg.py8
-rw-r--r--module/plugins/crypter/SexuriaCom.py61
-rw-r--r--module/plugins/crypter/ShareLinksBiz.py15
-rw-r--r--module/plugins/crypter/TNTVillageScambioeticoOrg.py4
10 files changed, 87 insertions, 68 deletions
diff --git a/module/plugins/crypter/CloudzillaToFolder.py b/module/plugins/crypter/CloudzillaToFolder.py
index 09b4d4c08..ff58f954c 100644
--- a/module/plugins/crypter/CloudzillaToFolder.py
+++ b/module/plugins/crypter/CloudzillaToFolder.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class CloudzillaToFolder(SimpleHoster):
__name__ = "CloudzillaToFolder"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.04"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/folder/(?P<ID>[\w^_]+)'
@@ -33,7 +33,7 @@ class CloudzillaToFolder(SimpleHoster):
self.html = self.load(self.pyfile.url, get={'key': self.get_password()})
if re.search(self.PASSWORD_PATTERN, self.html):
- self.retry(reason="Wrong password")
+ self.retry(msg="Wrong password")
getInfo = create_getInfo(CloudzillaToFolder)
diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py
index 8340adeb8..6c50c8480 100644
--- a/module/plugins/crypter/DevhostStFolder.py
+++ b/module/plugins/crypter/DevhostStFolder.py
@@ -42,7 +42,7 @@ class DevhostStFolder(SimpleCrypter):
p = r'href="(.+?)">Back to \w+<'
m = re.search(p, self.html)
- html = self.load(urlparse.urljoin("http://d-h.st", m.group(1)),
+ html = self.load(urlparse.urljoin("http://d-h.st/", m.group(1)),
cookies=False)
p = '\?fld_id=%s.*?">(.+?)<' % self.info['pattern']['ID']
diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py
index 9f4ad69aa..ac78e9aa8 100644
--- a/module/plugins/crypter/FilecryptCc.py
+++ b/module/plugins/crypter/FilecryptCc.py
@@ -16,7 +16,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha
class FilecryptCc(Crypter):
__name__ = "FilecryptCc"
__type__ = "crypter"
- __version__ = "0.18"
+ __version__ = "0.19"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?filecrypt\.cc/Container/\w+'
@@ -140,8 +140,9 @@ class FilecryptCc(Crypter):
for link in weblinks:
res = self.load("%s/Link/%s.html" % (self.base_url, link))
link2 = re.search('<iframe noresize src="(.*)"></iframe>', res)
- res2 = self.load(link2.group(1), just_header=True)
- self.links.append(res2['location'])
+ if link2:
+ res2 = self.load(link2.group(1), just_header=True)
+ self.links.append(res2['location'])
except Exception, e:
self.log_debug("Error decrypting weblinks: %s" % e)
diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py
index 026982014..2d423a1a9 100644..100755
--- a/module/plugins/crypter/Go4UpCom.py
+++ b/module/plugins/crypter/Go4UpCom.py
@@ -4,18 +4,20 @@ import re
import urlparse
from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
+import json
class Go4UpCom(SimpleCrypter):
__name__ = "Go4UpCom"
__type__ = "crypter"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'http://go4up\.com/(dl/\w{12}|rd/\w{12}/\d+)'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
- ("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
+ ("subfolder_per_pack", "bool", "Create a subfolder for each package", True),
+ ("preferred_hoster" , "int" , "Id of preferred hoster or 0 for all", 0)]
__description__ = """Go4Up.com decrypter plugin"""
__license__ = "GPLv3"
@@ -32,19 +34,20 @@ class Go4UpCom(SimpleCrypter):
def get_links(self):
links = []
-
- m = re.search(r'(/download/gethosts/.+?)"', self.html)
- if m:
- self.html = self.load(urlparse.urljoin("http://go4up.com/", m.group(1)))
- pages = [self.load(url) for url in re.findall(self.LINK_PATTERN, self.html)]
- else:
- pages = [self.html]
-
- for html in pages:
- try:
- links.append(re.search(r'<b><a href="(.+?)"', html).group(1))
- except Exception:
- continue
+ preference = self.get_config("preferred_hoster")
+
+ hosterslink_re = re.search(r'(/download/gethosts/.+?)"', self.html)
+ if hosterslink_re:
+ hosters = self.load(urlparse.urljoin("http://go4up.com/", hosterslink_re.group(1)))
+ for hoster in json.loads(hosters):
+ if preference != 0 and preference != int(hoster["hostId"]):
+ continue
+ pagelink_re = re.search(self.LINK_PATTERN, hoster["link"])
+ if pagelink_re:
+ page = self.load(pagelink_re.group(1))
+ link_re = re.search(r'<b><a href="(.+?)"', page)
+ if link_re:
+ links.append(link_re.group(1))
return links
diff --git a/module/plugins/crypter/GoogledriveComFolder.py b/module/plugins/crypter/GoogledriveComFolder.py
index 88c7ebab2..e7a5bae2c 100644
--- a/module/plugins/crypter/GoogledriveComFolder.py
+++ b/module/plugins/crypter/GoogledriveComFolder.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class GoogledriveComFolder(SimpleCrypter):
__name__ = "GoogledriveCom"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?drive\.google\.com/folderview\?.*id=\w+'
- __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides pyload.config['general']['folder_per_package']
+ __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
__description__ = """Drive.google.com folder decrypter plugin"""
diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py
index af13f55f6..16ee1d4f1 100644
--- a/module/plugins/crypter/LinkCryptWs.py
+++ b/module/plugins/crypter/LinkCryptWs.py
@@ -14,7 +14,7 @@ from module.utils import html_unescape
class LinkCryptWs(Crypter):
__name__ = "LinkCryptWs"
__type__ = "crypter"
- __version__ = "0.10"
+ __version__ = "0.12"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?linkcrypt\.ws/(dir|container)/(?P<ID>\w+)'
@@ -31,7 +31,6 @@ class LinkCryptWs(Crypter):
def setup(self):
- self.captcha = False
self.links = []
self.sources = ['cnl', 'web', 'dlc', 'rsdf', 'ccf']
@@ -60,7 +59,6 @@ class LinkCryptWs(Crypter):
self.retry(8, 15, _("Can't handle Key-Captcha"))
if self.is_captcha_protected():
- self.captcha = True
self.unlock_captcha_protection()
self.handle_captcha_errors()
@@ -154,7 +152,7 @@ class LinkCryptWs(Crypter):
unrarpw = sitein[indexi:indexe]
- if not (unrarpw == "Password" or "Dateipasswort") :
+ if unrarpw not in ("Password", "Dateipasswort"):
self.log_debug("File password set to: [%s]"% unrarpw)
self.pyfile.package().password = unrarpw
@@ -165,12 +163,11 @@ class LinkCryptWs(Crypter):
def handle_captcha_errors(self):
- if self.captcha:
- if "Your choice was wrong!" in self.html:
- self.captcha.invalid()
- self.retry()
- else:
- self.captcha.correct()
+ if "Your choice was wrong!" in self.html:
+ self.captcha.invalid()
+ self.retry()
+ else:
+ self.captcha.correct()
def handle_link_source(self, type):
diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py
index b4326b679..fb228c3cd 100644
--- a/module/plugins/crypter/MultiUpOrg.py
+++ b/module/plugins/crypter/MultiUpOrg.py
@@ -9,10 +9,10 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class MultiUpOrg(SimpleCrypter):
__name__ = "MultiUpOrg"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
- __pattern__ = r'http://(?:www\.)?multiup\.org/(en|fr)/(?P<TYPE>project|download|miror)/\w+(/\w+)?'
+ __pattern__ = r'http://(?:www\.)?multiup\.org/(en|fr)/(?P<TYPE>project|download|mirror)/\w+(/\w+)?'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -34,8 +34,8 @@ class MultiUpOrg(SimpleCrypter):
pattern = r'style="width:97%;text-align:left".*\n.*href="(.*)"'
if m_type == "download":
dl_pattern = r'href="(.*)">.*\n.*<h5>DOWNLOAD</h5>'
- miror_page = urlparse.urljoin("http://www.multiup.org", re.search(dl_pattern, self.html).group(1))
- self.html = self.load(miror_page)
+ mirror_page = urlparse.urljoin("http://www.multiup.org/", re.search(dl_pattern, self.html).group(1))
+ self.html = self.load(mirror_page)
return re.findall(pattern, self.html)
diff --git a/module/plugins/crypter/SexuriaCom.py b/module/plugins/crypter/SexuriaCom.py
index 7942d5e42..24a5060b9 100644
--- a/module/plugins/crypter/SexuriaCom.py
+++ b/module/plugins/crypter/SexuriaCom.py
@@ -1,25 +1,23 @@
# -*- coding: utf-8 -*-
import re
-
from module.plugins.internal.Crypter import Crypter
-
class SexuriaCom(Crypter):
__name__ = "SexuriaCom"
__type__ = "crypter"
- __version__ = "0.04"
+ __version__ = "0.10"
__status__ = "testing"
__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_pack", "bool", "Create a subfolder for each package", True)]
+ __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"
__authors__ = [("NETHead", "NETHead.AT.gmx.DOT.net")]
-
+ #: Constants
PATTERN_SUPPORTED_MAIN = r'http://(www\.)?sexuria\.com/(v1/)?Pornos_Kostenlos_.+?_(\d+)\.html'
PATTERN_SUPPORTED_CRYPT = r'http://(www\.)?sexuria\.com/(v1/)?dl_links_\d+_(?P<ID>\d+)\.html'
PATTERN_SUPPORTED_REDIRECT = r'http://(www\.)?sexuria\.com/out\.php\?id=(?P<ID>\d+)\&part=\d+\&link=\d+'
@@ -27,15 +25,17 @@ class SexuriaCom(Crypter):
PATTERN_PASSWORD = r'<strong>Passwort: </strong></div></td>.*?bgcolor="#EFEFEF">(?P<PWD>.*?)</td>'
PATTERN_DL_LINK_PAGE = r'"(dl_links_\d+_\d+\.html)"'
PATTERN_REDIRECT_LINKS = r'value="(http://sexuria\.com/out\.php\?id=\d+\&part=\d+\&link=\d+)" readonly'
-
+ LIST_PWDIGNORE = ["Kein Passwort", "-"]
def decrypt(self, pyfile):
#: Init
self.pyfile = pyfile
self.package = pyfile.package()
- #: Get package links
+ #: Decrypt and add links
package_name, self.links, folder_name, package_pwd = self.decrypt_links(self.pyfile.url)
+ if package_pwd:
+ self.pyfile.package().password = package_pwd
self.packages = [(package_name, self.links, folder_name)]
@@ -62,34 +62,45 @@ class SexuriaCom(Crypter):
#: Extract info from main file
id = re.search(self.PATTERN_SUPPORTED_CRYPT, url, re.I).group('ID')
html = self.load("http://sexuria.com/v1/Pornos_Kostenlos_info_%s.html" % id)
+ #: Webpage title / Package name
+ titledata = re.search(self.PATTERN_TITLE, html, re.I)
+ if not titledata:
+ self.log_warning("No title data found, has site changed?")
+ else:
+ title = titledata.group('TITLE').strip()
+ if title:
+ name = folder = title
+ self.log_debug("Package info found, name [%s] and folder [%s]" % (name, folder))
+ #: Password
+ pwddata = re.search(self.PATTERN_PASSWORD, html, re.I | re.S)
+ if not pwddata:
+ self.log_warning("No password data found, has site changed?")
+ else:
+ pwd = pwddata.group('PWD').strip()
+ if pwd and not (pwd in self.LIST_PWDIGNORE):
+ password = pwd
+ self.log_debug("Package info found, password [%s]" % password)
- title = re.search(self.PATTERN_TITLE, html, re.I).group('TITLE').strip()
- if title:
- name = folder = title
- self.log_debug("Package info found, name [%s] and folder [%s]" % (name, folder))
-
- pwd = re.search(self.PATTERN_PASSWORD, html, re.I | re.S).group('PWD')
- if pwd and pwd not in ("Kein Passwort", "-"):
- password = pwd.strip()
- self.log_debug("Password info [%s] found" % password)
-
- #: Process link (dl_link)
+ #: Process links (dl_link)
html = self.load(url)
links = re.findall(self.PATTERN_REDIRECT_LINKS, html, re.I)
- if len(links) == 0:
+ if not links:
self.log_error(_("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:
+ if not finallink or ("sexuria.com/" in finallink):
self.log_error(_("Broken for link: %s") % link)
else:
linklist.append(finallink)
- #: Debug log
- self.log_debug("%d supported links" % len(linklist))
- for i, link in enumerate(linklist):
- self.log_debug("Supported link %d, %s" % (i + 1, link))
+ #: Log result
+ if not linklist:
+ self.fail(_("Unable to extract links (maybe plugin out of date?)"))
+ else:
+ for i, link in enumerate(linklist):
+ self.log_debug("Supported link %d/%d: %s" % (i+1, len(linklist), link))
+ #: All done, return to caller
return name, linklist, folder, password
diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py
index 6fbe59b38..712b4fff2 100644
--- a/module/plugins/crypter/ShareLinksBiz.py
+++ b/module/plugins/crypter/ShareLinksBiz.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Crypter import Crypter
class ShareLinksBiz(Crypter):
__name__ = "ShareLinksBiz"
__type__ = "crypter"
- __version__ = "1.16"
+ __version__ = "1.17"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P<ID>_?\w+)'
@@ -68,8 +68,12 @@ class ShareLinksBiz(Crypter):
url = pyfile.url
if 's2l.biz' in url:
url = self.load(url, just_header=True)['location']
- self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1)
- self.file_id = re.match(self.__pattern__, url).group('ID')
+ if re.match(self.__pattern__, url):
+ self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1)
+ self.file_id = re.match(self.__pattern__, url).group('ID')
+ else:
+ self.log_debug("Could not initialize, URL [%s] does not match pattern [%s]" % (url, self.__pattern__))
+ self.fail("Unsupported download link")
self.package = pyfile.package()
@@ -114,7 +118,10 @@ class ShareLinksBiz(Crypter):
self.log_debug("Captcha map with [%d] positions" % len(captchaMap.keys()))
#: Request user for captcha coords
- m = re.search(r'<img src="/captcha.gif\?d=(.*?)&amp;PHPSESSID=(.*?)&amp;legend=1"', self.html)
+ m = re.search(r'<img src="/captcha.gif\?d=(.+?)&PHPSESSID=(.+?)&legend=1"', self.html)
+ if not m:
+ self.log_debug("Captcha url data not found, maybe plugin out of date?")
+ self.fail("Captcha url data not found")
captchaUrl = self.base_url + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2))
self.log_debug("Waiting user for correct position")
coords = self.captcha.decrypt(captchaUrl, input_type="gif", output_type='positional')
diff --git a/module/plugins/crypter/TNTVillageScambioeticoOrg.py b/module/plugins/crypter/TNTVillageScambioeticoOrg.py
index 6ba1ee19b..e85a8fbb7 100644
--- a/module/plugins/crypter/TNTVillageScambioeticoOrg.py
+++ b/module/plugins/crypter/TNTVillageScambioeticoOrg.py
@@ -6,11 +6,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class TNTVillageScambioeticoOrg(SimpleCrypter):
__name__ = "TNTVillageScambioeticoOrg"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?forum\.tntvillage\.scambioetico\.org/index\.php\?.*showtopic=\d+'
- __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides pyload.config['general']['folder_per_package']
+ __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
__description__ = """TNTVillage.scambioetico.org decrypter plugin"""