summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/TrailerzoneInfo.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2013-10-13 19:38:44 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2013-10-13 19:38:44 +0200
commitc3438b39d7497178300f4518692ef212abd5c614 (patch)
tree2f8a912fb8028fa6a332c4842f5d6df144da6649 /module/plugins/crypter/TrailerzoneInfo.py
parentRemoved dead plugins. (diff)
downloadpyload-c3438b39d7497178300f4518692ef212abd5c614.tar.xz
Mark dead crypters as DeadCrypter
Diffstat (limited to 'module/plugins/crypter/TrailerzoneInfo.py')
-rw-r--r--module/plugins/crypter/TrailerzoneInfo.py39
1 files changed, 3 insertions, 36 deletions
diff --git a/module/plugins/crypter/TrailerzoneInfo.py b/module/plugins/crypter/TrailerzoneInfo.py
index b55c8d219..cdd84bbc6 100644
--- a/module/plugins/crypter/TrailerzoneInfo.py
+++ b/module/plugins/crypter/TrailerzoneInfo.py
@@ -1,46 +1,13 @@
# -*- coding: utf-8 -*-
-import re
-from module.plugins.Crypter import Crypter
+from module.plugins.internal.DeadCrypter import DeadCrypter
-class TrailerzoneInfo(Crypter):
+class TrailerzoneInfo(DeadCrypter):
__name__ = "TrailerzoneInfo"
__type__ = "crypter"
__pattern__ = r"http://(www\.)?trailerzone.info/.*?"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """TrailerZone.info Crypter Plugin"""
__author_name__ = ("godofdream")
__author_mail__ = ("soilfiction@gmail.com")
-
- JS_KEY_PATTERN = r"<script>(.*)var t = window"
-
- def decrypt(self, pyfile):
- protectPattern = re.compile("http://(www\.)?trailerzone.info/protect.html.*?")
- goPattern = re.compile("http://(www\.)?trailerzone.info/go.html.*?")
- url = pyfile.url
- if protectPattern.match(url):
- self.handleProtect(url)
- elif goPattern.match(url):
- self.handleGo(url)
-
- def handleProtect(self, url):
- self.handleGo("http://trailerzone.info/go.html#:::" + url.split("#:::", 1)[1])
-
- def handleGo(self, url):
-
- src = self.req.load(str(url))
- pattern = re.compile(self.JS_KEY_PATTERN, re.DOTALL)
- found = re.search(pattern, src)
-
- # Get package info
- package_links = []
- try:
- result = self.js.eval(found.group(1) + " decodeLink('" + url.split("#:::", 1)[1] + "');")
- result = str(result)
- self.logDebug("RESULT: %s" % result)
- package_links.append(result)
- self.core.files.addLinks(package_links, self.pyfile.package().id)
- except Exception, e:
- self.logDebug(e)
- self.fail('Could not extract any links by javascript')