diff options
author | zoidberg10 <zoidberg@mujmail.cz> | 2012-01-30 18:17:43 +0100 |
---|---|---|
committer | zoidberg10 <zoidberg@mujmail.cz> | 2012-01-30 18:17:43 +0100 |
commit | 2f31e623d7d3aab497533c4fd1cc8d0260419c57 (patch) | |
tree | 803f87aef00bd49e61edeb654f36dbedc297788d /module | |
parent | increase version (diff) | |
download | pyload-2f31e623d7d3aab497533c4fd1cc8d0260419c57.tar.xz |
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/crypter/LinkdecrypterCom.py | 6 | ||||
-rw-r--r-- | module/plugins/hooks/LinkdecrypterCom.py | 52 | ||||
-rw-r--r-- | module/plugins/hoster/FshareVn.py | 44 |
3 files changed, 87 insertions, 15 deletions
diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index 83c74188d..768278fdd 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -22,9 +22,7 @@ from module.plugins.Crypter import Crypter class LinkdecrypterCom(Crypter): __name__ = "LinkdecrypterCom" __type__ = "crypter" - #excluded: "1kh\.de|crypt-it\.com|linksave\.in|lix\.in|lof\.cc|multiload\.cz|multiupload\.com|ncrypt\.in|relink\.us|rs-layer\.com|secured\.in|stealth\.to" - __pattern__ = r"http://(\w*\.)?(00\.uz|10001mb\.com|123link\.it|123url\.org|1cl\.in|1tool\.biz|1zh\.us|2joy\.de|2so\.be|3\.ly|5\.gp|6nc\.net|7li\.in|9\.bb|adf\.ly|adflav\.com|adfoc\.us|allanalpass\.com|alturl\.com|amy\.gs|any\.gs|apurl\.ru|aurl\.es|b23\.ru|baberepublic\.com|bai\.lu|bat5\.com|bax\.li|bc\.vc|beam\.to|birurl\.com|bit\.ly|blu\.cc|bofh\.us|boo\.io|c\.ly|capourl\.com|cash4links\.co|cc\.st|cd\.vg|cl\.lk|cli\.gs|cloneurl\.com|convertircodigo\.com|crypt\.to|crypt2\.be|cryptlink\.ws|ddl-warez\.in|deb\.gs|deurl\.me|digzip\.com|djurl\.com|dl-protect\.com|dl\.dropbox\.com|doiop\.com|ehe\.me|embedupload\.com|encript\.in|encurtador\.com|enlacs\.com|evg\.in|extreme-protect\.com|fa\.by|faja\.me|fapoff\.com|fdnlinks\.com|fea\.me|fff\.to|filedeck\.net|filemirrorupload\.com|filesonthe\.net|fileupster\.com|flameupload\.com|freetexthost\.com|fwd4\.me|fyad\.org|galleries\.bz|goandgrab\.info|goblig\.com|goo\.gl|guardlink\.org|h-url\.in|hasurl\.co\.cc|hide-url\.net|hidemyass\.com|hides\.at|hideurl\.biz|ho\.io|hornywood\.tv|href\.hu|id2\.tryjav\.com|ilii\.in|ilix\.in|ily\.me|ino\.me|interupload\.com|is\.gd|ivpaste\.com|j\.mp|j7\.se|je\.pl|jheberg\.com|just\.as|kickupload\.com|klnk\.de|knoffl\.com|kodo\.ameoto\.com|ks\.gs|latwy\.pl|li\.co\.ve|link-go\.info|link-protector\.com|link-safe\.net|link\.file-up\.ru|link4jo\.com|linkanonimo\.com|linkbabes\.com|linkbank\.eu|linkbee\.com|linkblur\.com|linkbucks\.com|linkbun\.ch|linkcrypt\.com|linkcrypt\.ws|linkencrypter\.com|linkhide\.com\.ar|linkhide\.in|linkoculto\.net|linkok\.org|linkprivado\.com|linkprivate\.net|linkprotect\.in|links-protect\.com|links-protect\.info|links-protection\.com|links\.tc|linksafe\.me|linksaver\.info|linkse\.info|linkseguro\.com\.ar|linkseguro\.org|linksole\.com|linksprotec\.com|linksprotegidos\.info|linkssafe\.com|linkto\.net|linkweb\.dk|linkx\.in|linkzip\.net|listedfiles\.com|littleurl\.net|lixk\.me|lixxin\.com|ljv2\.com|lkt\.es|ll11\.org|lnk\.cm|lnk\.co|longr\.us|lovelink\.in|madlink\.sk|maxi-upload\.com|mcaf\.ee|mediahide\.com|megaline\.co|megalinks\.es|megaupper\.com|mf1\.jp|mhz\.me|migre\.me|miniurl\.com|miniurl\.es|miniurl\.org|miniurls\.co|minu\.me|mir\.cr|mirrorcreator\.com|mo\.by|multi-uploadeur\.com|murl\.kz|musicalmente\.info|myooo\.info|mypaqe\.com|mypl\.us|myrapidlinks\.com|myref\.de|myurl\.in|nbanews\.us|nov\.io|okconsolas\.com|oneddl\.canhaz\.it|ow\.ly|p4p\.com\.es|p6l\.org|paste\.frubar\.net|paste\.hotfile-bb\.com|paste\.to|paste\.ubuntu\.com|paste2\.org|paste21\.info|pastebin\.com|paylesssofts\.net|poontown\.net|pqueno\.com|priva\.us|protec-link\.com|protect-ddl\.com|protect-my-links\.com|protected\.socadvnet\.com|protectlinks\.com|protectlinks\.net|protectlk\.com|protege-mes-liens\.com|ptl\.li|qooy\.com|qqc\.co|qvvo\.com|rapidfolder\.com|rapidsafe\.de|rapidsafe\.org|rapidshare\.mu|realfiles\.net|redir\.ec|ref\.so|relinka\.net|rexwo\.com|rqq\.co|rsmonkey\.com|rurls\.ru|s2l\.biz|saf\.li|safe\.mn|safelinking\.net|saferlinks\.com|scut\.ly|sealed\.in|seclnk\.in|seriousfiles\.com|share-links\.biz|sharebee\.com|short-link\.fr|shortlink\.ca|shorturlscript\.net|shrt\.st|simurl\.com|sinl\.es|skroc\.pl|slexy\.org|slnky\.net|smlk\.es|smsdl\.com|sn\.im|snipr\.com|snipurl\.com|snurl\.com|sonofertas\.es|spedr\.com|spreadlink\.us|star-cyber\.com|stu\.tc|subedlc\.com|subirfacil\.com|syl\.me|szort\.pl|t\.co|t7\.hu|takemyfile\.com|takemylinks\.com|textsave\.de|textsnip\.com|thecow\.me|thesefiles\.com|thinfi\.com|tilien\.net|tiny\.cc|tiny\.lt|tinylinks\.co|tinypaste\.com|tinyurl\.com|tinyurlscript\.info|tmf\.myegy\.com|togoto\.us|tot\.to|tra\.kz|trick\.ly|u\.to|uberpicz\.com|ubervidz\.com|ulinks\.net|ultrafiles\.net|undeadlink\.com|uploadjockey\.com|uploadmirrors\.com|uploadonall\.com|upmirror\.com|upsafe\.org|ur\.ly|url-go\.com|url-site\.com|url\.zeta24\.com|url4t\.com|urla\.in|urlbeat\.net|urlcash\.net|urlcorta\.es|urlcrypt\.com|urlcut\.com|urlcut\.in|urldefender\.com|urlink\.at|urln\.tk|urlpulse\.net|urlspy\.co\.cc|urwij|uselink\.info|uucc\.cc|uze\.in|wa9\.la|wcrypt\.in|webtooljungle\.com|weepax\.com|whackyvidz\.com|wtc\.la|x-ls\.ru|x\.co|xa\.ly|xc\.io|xr\.com|xtreemhost\.com|xurl\.cn|xurl\.es|xxs\.ru|youfap\.me|ysu\.me|yvy\.me|yyv\.co|zff\.co|zio\.in|zpag\.es)/.*" - __version__ = "0.23" + __version__ = "0.24" __description__ = """linkdecrypter.com""" __author_name__ = ("zoidberg", "flowlee") @@ -71,7 +69,7 @@ class LinkdecrypterCom(Crypter): while self.passwords or retries: found = re.search(self.TEXTAREA_PATTERN, self.html, flags=re.DOTALL) - if found: return found.group(1).splitlines() + if found: return [ x for x in found.group(1).splitlines() if '[LINK-ERROR]' not in x ] found = re.search(self.CAPTCHA_PATTERN, self.html) if found: diff --git a/module/plugins/hooks/LinkdecrypterCom.py b/module/plugins/hooks/LinkdecrypterCom.py new file mode 100644 index 000000000..5acdbddcb --- /dev/null +++ b/module/plugins/hooks/LinkdecrypterCom.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +""" + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see <http://www.gnu.org/licenses/>. + + @author: zoidberg +""" + +import re + +from module.plugins.Hook import Hook +from module.network.RequestFactory import getURL +from module.utils import remove_chars + +class LinkdecrypterCom(Hook): + __name__ = "LinkdecrypterCom" + __version__ = "0.1" + __description__ = """linkdecrypter.com - regexp loader""" + __config__ = [ ("activated", "bool", "Activated" , "True") ] + __author_name__ = ("zoidberg") + + def coreReady(self): + page = getURL("http://linkdecrypter.com/") + m = re.search(r'<b>Supported</b>: <i>([^+<]*)', page) + if not m: + self.logError(_("Crypter list not found")) + return + + online = m.group(1).split(', ') + builtin = [ name.lower() for name in self.core.pluginManager.crypterPlugins.keys() ] + online = [ crypter.replace(".", "\\.") for crypter in online if remove_chars(crypter, "-.") not in builtin ] + if not online: + self.logError(_("Crypter list is empty")) + return + + regexp = r"http://[\w.]*?(%s).*" % "|".join(online) + + dict = self.core.pluginManager.crypterPlugins[self.__name__] + dict["pattern"] = regexp + dict["re"] = re.compile(regexp) + + self.logDebug("REGEXP: " + regexp)
\ No newline at end of file diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index 5a8b00c17..977e97211 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -16,23 +16,27 @@ def getInfo(urls): yield file_info +def doubleDecode(m): + return m.group(1).decode('raw_unicode_escape') + class FshareVn(SimpleHoster): __name__ = "FshareVn" __type__ = "hoster" __pattern__ = r"http://(www\.)?fshare.vn/file/.*" - __version__ = "0.12" + __version__ = "0.13" __description__ = """FshareVn Download Hoster""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - FILE_INFO_PATTERN = r'<p>(?P<N>[^<]+)<\\/p>\\r\\n\s*<p>(?P<S>[0-9,.]+)\s*(?P<U>[kKMG])i?B<\\/p>' + FILE_INFO_PATTERN = r'<p>(?P<N>[^<]+)<\\/p>[\\trn\s]*<p>(?P<S>[0-9,.]+)\s*(?P<U>[kKMG])i?B<\\/p>' FILE_OFFLINE_PATTERN = r'<div class=\\"f_left file_(enable|w)\\">' + FILE_NAME_REPLACEMENTS = [("(.*)", doubleDecode)] DOWNLOAD_URL_PATTERN = r"<a class=\"bt_down\" id=\"down\".*window.location='([^']+)'\">" FORM_PATTERN = r'<form action="" method="post" name="frm_download">(.*?)</form>' FORM_INPUT_PATTERN = r'<input[^>]* name="?([^" ]+)"? value="?([^" ]+)"?[^>]*>' VIP_URL_PATTERN = r'<form action="([^>]+)" method="get" name="frm_download">' - WAIT_PATTERN = u"Vui lòng chờ cho lượt download kế tiếp !" + WAIT_PATTERN = u"Vui lòng chờ lượt download kế tiếp" def process(self, pyfile): self.html = self.load('http://www.fshare.vn/check_link.php', post = { @@ -40,15 +44,17 @@ class FshareVn(SimpleHoster): "arrlinks": pyfile.url }, decode = True) self.getFileInfo() - if self.account and self.premium: - self.handlePremium() - else: - self.handleFree() + + url = self.handlePremium() if self.premium else self.handleFree() + self.download(url) + self.checkDownloadedFile() def handleFree(self): self.html = self.load(self.pyfile.url, decode = True) if self.WAIT_PATTERN in self.html: - self.retry(300, 20, "Try again later...") + self.retry(20, 300, "Try again later...") + + self.checkErrors() found = re.search(self.FORM_PATTERN, self.html, re.DOTALL) if not found: self.parseError('FORM') @@ -68,15 +74,18 @@ class FshareVn(SimpleHoster): self.setWait(int(found.group(1)) if found else 30) self.wait() - self.download(url) + return url def handlePremium(self): header = self.load(self.pyfile.url, just_header = True) if 'location' in header and header['location'].startswith('http://download'): self.logDebug('Direct download') - self.download(self.pyfile.url) + return self.pyfile.url else: self.html = self.load(self.pyfile.url) + + self.checkErrors() + found = re.search(self.VIP_URL_PATTERN, self.html) if not found: if self.retries >= 3: self.resetAccount() @@ -84,4 +93,17 @@ class FshareVn(SimpleHoster): self.retry(5, 1, 'VIP URL not found') url = found.group(1) self.logDebug('VIP URL: ' + url) - self.download(url)
\ No newline at end of file + return url + + def checkErrors(self): + if '/error.php?' in self.req.lastEffectiveURL: + self.offline() + + def checkDownloadedFile(self): + # check download + check = self.checkDownload({ + "not_found": ("<head><title>404 Not Found</title></head>") + }) + + if check == "not_found": + self.fail("File not found on server")
\ No newline at end of file |