summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-04-11 00:40:29 +0200
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-04-11 00:40:29 +0200
commit5ce7835dc10327b62e642d4fab48061ade0ae0c0 (patch)
tree9fbd7ec70e23187981ea589620e34fd83aa16c1a /module/plugins/crypter
parentversion bump (diff)
downloadpyload-5ce7835dc10327b62e642d4fab48061ade0ae0c0.tar.xz
update letitbit, depositfiles, ul.to; add trailerzone crypter by godofdream
closed #570
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/TrailerzoneInfo.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/module/plugins/crypter/TrailerzoneInfo.py b/module/plugins/crypter/TrailerzoneInfo.py
new file mode 100644
index 000000000..e52c5429c
--- /dev/null
+++ b/module/plugins/crypter/TrailerzoneInfo.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+
+import re
+from module.plugins.Crypter import Crypter
+
+class TrailerzoneInfo(Crypter):
+ __name__ = "TrailerzoneInfo"
+ __type__ = "container"
+ __pattern__ = r"http://(www\.)?trailerzone.info/.*?"
+ __version__ = "0.01"
+ __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')