diff options
Diffstat (limited to 'pyload/plugins/crypter')
-rw-r--r-- | pyload/plugins/crypter/DDLMusicOrg.py | 4 | ||||
-rw-r--r-- | pyload/plugins/crypter/DuckCryptInfo.py | 7 | ||||
-rw-r--r-- | pyload/plugins/crypter/HoerbuchIn.py | 2 | ||||
-rw-r--r-- | pyload/plugins/crypter/HotfileFolderCom.py | 23 | ||||
-rw-r--r-- | pyload/plugins/crypter/LinkSaveIn.py | 26 | ||||
-rw-r--r-- | pyload/plugins/crypter/LixIn.py | 10 | ||||
-rw-r--r-- | pyload/plugins/crypter/OneKhDe.py | 5 |
7 files changed, 36 insertions, 41 deletions
diff --git a/pyload/plugins/crypter/DDLMusicOrg.py b/pyload/plugins/crypter/DDLMusicOrg.py index 52c10dc42..8c944c306 100644 --- a/pyload/plugins/crypter/DDLMusicOrg.py +++ b/pyload/plugins/crypter/DDLMusicOrg.py @@ -23,7 +23,7 @@ class DDLMusicOrg(Crypter): self.multiDL = False def decrypt(self, pyfile): - html = self.req.load(pyfile.url, cookies=True) + html = self.load(pyfile.url, cookies=True) if re.search(r"Wer dies nicht rechnen kann", html) is not None: self.offline() @@ -38,7 +38,7 @@ class DDLMusicOrg(Crypter): else: solve = int(math.group(1)) - int(math.group(3)) sleep(3) - htmlwithlink = self.req.load(pyfile.url, cookies=True, + htmlwithlink = self.load(pyfile.url, cookies=True, post={"calc%s" % linknr: solve, "send%s" % linknr: "Send", "id": id, "linknr": linknr}) m = re.search(r"<form id=\"ff\" action=\"(.*?)\" method=\"post\">", htmlwithlink) diff --git a/pyload/plugins/crypter/DuckCryptInfo.py b/pyload/plugins/crypter/DuckCryptInfo.py index 450fc867a..7f25b9ae6 100644 --- a/pyload/plugins/crypter/DuckCryptInfo.py +++ b/pyload/plugins/crypter/DuckCryptInfo.py @@ -23,12 +23,7 @@ class DuckCryptInfo(Crypter): def decrypt(self, pyfile): url = pyfile.url - # seems we don't need to wait - #src = self.req.load(str(url)) - #m = re.search(self.TIMER_PATTERN, src) - #if m: - # self.logDebug("Sleeping for" % m.group(1)) - # self.setWait(int(m.group(1)) ,False) + m = re.match(self.__pattern__, url) if m is None: self.fail('Weird error in link') diff --git a/pyload/plugins/crypter/HoerbuchIn.py b/pyload/plugins/crypter/HoerbuchIn.py index 2c72eef27..572472f5a 100644 --- a/pyload/plugins/crypter/HoerbuchIn.py +++ b/pyload/plugins/crypter/HoerbuchIn.py @@ -45,7 +45,7 @@ class HoerbuchIn(Crypter): url = m.group(0) self.pyfile.url = url - src = self.req.load(url, post={"viewed": "adpg"}) + src = self.load(url, post={"viewed": "adpg"}) links = [] pattern = re.compile("http://www\.hoerbuch\.in/protection/(\w+)/(.*?)\"") diff --git a/pyload/plugins/crypter/HotfileFolderCom.py b/pyload/plugins/crypter/HotfileFolderCom.py index 21d086302..4f144cc52 100644 --- a/pyload/plugins/crypter/HotfileFolderCom.py +++ b/pyload/plugins/crypter/HotfileFolderCom.py @@ -1,30 +1,15 @@ # -*- coding: utf-8 -*- -import re +from pyload.plugins.internal.DeadCrypter import DeadCrypter -from pyload.plugins.base.Crypter import Crypter - -class HotfileFolderCom(Crypter): +class HotfileFolderCom(DeadCrypter): __name__ = "HotfileFolderCom" __type__ = "crypter" - __version__ = "0.1" + __version__ = "0.3" - __pattern__ = r'http://(?:www\.)?hotfile.com/list/\w+/\w+' + __pattern__ = r'https?://(?:www\.)?hotfile\.com/list/\w+/\w+' __description__ = """Hotfile.com folder decrypter plugin""" __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.org" - - - def decrypt(self, pyfile): - html = self.load(pyfile.url) - - name = re.findall( - r'<img src="/i/folder.gif" width="23" height="14" style="margin-bottom: -2px;" />([^<]+)', html, - re.MULTILINE)[0].replace("/", "") - new_links = re.findall(r'href="(http://(www.)?hotfile\.com/dl/\d+/[0-9a-zA-Z]+[^"]+)', html) - - new_links = [x[0] for x in new_links] - - self.packages = [(name, new_links, name)] diff --git a/pyload/plugins/crypter/LinkSaveIn.py b/pyload/plugins/crypter/LinkSaveIn.py index fcc526092..f5c28e28e 100644 --- a/pyload/plugins/crypter/LinkSaveIn.py +++ b/pyload/plugins/crypter/LinkSaveIn.py @@ -8,14 +8,15 @@ import binascii import re from Crypto.Cipher import AES -from pyload.plugins.base.Crypter import Crypter + +from pyload.plugins.internal.SimpleCrypter import SimpleCrypter from pyload.utils import html_unescape -class LinkSaveIn(Crypter): +class LinkSaveIn(SimpleCrypter): __name__ = "LinkSaveIn" __type__ = "crypter" - __version__ = "2.01" + __version__ = "2.02" __pattern__ = r'http://(?:www\.)?linksave.in/(?P<id>\w+)$' @@ -23,10 +24,12 @@ class LinkSaveIn(Crypter): __author_name__ = "fragonib" __author_mail__ = "fragonib[AT]yahoo[DOT]es" + + COOKIES = [(".linksave.in", "Linksave_Language", "english")] + # Constants _JK_KEY_ = "jk" _CRYPTED_KEY_ = "crypted" - HOSTER_NAME = "linksave.in" def setup(self): @@ -36,11 +39,11 @@ class LinkSaveIn(Crypter): self.package = None self.preferred_sources = ["cnl2", "rsdf", "ccf", "dlc", "web"] + def decrypt(self, pyfile): # Init self.package = pyfile.package() self.fileid = re.match(self.__pattern__, pyfile.url).group('id') - self.req.cj.setCookie(self.HOSTER_NAME, "Linksave_Language", "english") # Request package self.html = self.load(pyfile.url) @@ -74,41 +77,48 @@ class LinkSaveIn(Crypter): else: self.fail('Could not extract any links') + def isOnline(self): if "<big>Error 404 - Folder not found!</big>" in self.html: self.logDebug("File not found") return False return True + def isPasswordProtected(self): if re.search(r'''<input.*?type="password"''', self.html): self.logDebug("Links are password protected") return True + def isCaptchaProtected(self): if "<b>Captcha:</b>" in self.html: self.logDebug("Links are captcha protected") return True return False + def unlockPasswordProtection(self): password = self.getPassword() self.logDebug("Submitting password [%s] for protected links" % password) post = {"id": self.fileid, "besucherpasswort": password, 'login': 'submit'} self.html = self.load(self.pyfile.url, post=post) + def unlockCaptchaProtection(self): captcha_hash = re.search(r'name="hash" value="([^"]+)', self.html).group(1) captcha_url = re.search(r'src=".(/captcha/cap.php\?hsh=[^"]+)', self.html).group(1) captcha_code = self.decryptCaptcha("http://linksave.in" + captcha_url, forceUser=True) self.html = self.load(self.pyfile.url, post={"id": self.fileid, "hash": captcha_hash, "code": captcha_code}) + def getPackageInfo(self): name = self.pyfile.package().name folder = self.pyfile.package().folder self.logDebug("Defaulting to pyfile name [%s] and folder [%s] for package" % (name, folder)) return name, folder + def handleErrors(self): if "The visitorpassword you have entered is wrong" in self.html: self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry") @@ -122,6 +132,7 @@ class LinkSaveIn(Crypter): else: self.correctCaptcha() + def handleLinkSource(self, type_): if type_ == "cnl2": return self.handleCNL2() @@ -132,6 +143,7 @@ class LinkSaveIn(Crypter): else: self.fail('unknown source type "%s" (this is probably a bug)' % type_) + def handleWebLinks(self): package_links = [] self.logDebug("Search for Web links") @@ -159,6 +171,7 @@ class LinkSaveIn(Crypter): self.logDebug("Error decrypting Web link %s, %s" % (webLink, detail)) return package_links + def handleContainer(self, type_): package_links = [] type_ = type_.lower() @@ -173,6 +186,7 @@ class LinkSaveIn(Crypter): package_links.append(link) return package_links + def handleCNL2(self): package_links = [] self.logDebug("Search for CNL2 links") @@ -187,6 +201,7 @@ class LinkSaveIn(Crypter): self.fail("Unable to decrypt CNL2 links") return package_links + def _getCipherParams(self): # Get jk jk_re = r'<INPUT.*?NAME="%s".*?VALUE="(.*?)"' % LinkSaveIn._JK_KEY_ @@ -200,6 +215,7 @@ class LinkSaveIn(Crypter): self.logDebug("Detected %d crypted blocks" % len(vcrypted)) return vcrypted, vjk + def _getLinks(self, crypted, jk): # Get key jreturn = self.js.eval("%s f()" % jk) diff --git a/pyload/plugins/crypter/LixIn.py b/pyload/plugins/crypter/LixIn.py index 63d1e1869..831f35c22 100644 --- a/pyload/plugins/crypter/LixIn.py +++ b/pyload/plugins/crypter/LixIn.py @@ -10,7 +10,7 @@ class LixIn(Crypter): __type__ = "crypter" __version__ = "0.22" - __pattern__ = r'http://(www.)?lix.in/(?P<id>.*)' + __pattern__ = r'http://(?:www\.)?lix\.in/(?P<ID>.+)' __description__ = """Lix.in decrypter plugin""" __author_name__ = "spoob" @@ -28,10 +28,10 @@ class LixIn(Crypter): if m is None: self.fail("couldn't identify file id") - id = m.group("id") + id = m.group("ID") self.logDebug("File id is %s" % id) - self.html = self.req.load(url, decode=True) + self.html = self.load(url, decode=True) m = re.search(self.SUBMIT_PATTERN, self.html) if m is None: @@ -44,12 +44,12 @@ class LixIn(Crypter): if m: self.logDebug("Trying captcha") captcharesult = self.decryptCaptcha("http://lix.in/" + m.group("image")) - self.html = self.req.load(url, decode=True, + self.html = self.load(url, decode=True, post={"capt": captcharesult, "submit": "submit", "tiny": id}) else: self.logDebug("No captcha/captcha solved") else: - self.html = self.req.load(url, decode=True, post={"submit": "submit", "tiny": id}) + self.html = self.load(url, decode=True, post={"submit": "submit", "tiny": id}) m = re.search(self.LINK_PATTERN, self.html) if m is None: diff --git a/pyload/plugins/crypter/OneKhDe.py b/pyload/plugins/crypter/OneKhDe.py index 4f5592fb8..b39504628 100644 --- a/pyload/plugins/crypter/OneKhDe.py +++ b/pyload/plugins/crypter/OneKhDe.py @@ -30,9 +30,8 @@ class OneKhDe(Crypter): def proceed(self, url, location): url = self.parent.url - self.html = self.req.load(url) + self.html = self.load(url) link_ids = re.findall(r"<a id=\"DownloadLink_(\d*)\" href=\"http://1kh.de/", self.html) for id in link_ids: - new_link = html_unescape( - re.search("width=\"100%\" src=\"(.*)\"></iframe>", self.req.load("http://1kh.de/l/" + id)).group(1)) + new_link = html_unescape(re.search("width=\"100%\" src=\"(.*)\"></iframe>", self.load("http://1kh.de/l/" + id)).group(1)) self.urls.append(new_link) |