summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
authorGravatar godofdream <soilfiction@gmail.com> 2012-08-29 01:58:17 +0200
committerGravatar godofdream <soilfiction@gmail.com> 2012-08-29 01:58:17 +0200
commit1195fb68b638b05a912d2074cd62d9e75bb7508b (patch)
treee8e11ba947e7a09100fff20c27d11a4ebd482fb1 /module/plugins/crypter
parentshare-rapid.cz hotfix (diff)
downloadpyload-1195fb68b638b05a912d2074cd62d9e75bb7508b.tar.xz
Added DuckcryptInfo decrypter, smaller fixes
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/DuckCryptInfo.py57
-rw-r--r--module/plugins/crypter/TrailerzoneInfo.py4
2 files changed, 59 insertions, 2 deletions
diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py
new file mode 100644
index 000000000..6e7166ff8
--- /dev/null
+++ b/module/plugins/crypter/DuckCryptInfo.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+
+import re
+from module.lib.BeautifulSoup import BeautifulSoup
+from module.plugins.Crypter import Crypter
+
+class DuckCryptInfo(Crypter):
+ __name__ = "DuckCryptInfo"
+ __type__ = "container"
+ __pattern__ = r"http://(?:www\.)?duckcrypt.info/(folder|wait|link)/(\w+)/?(\w*)"
+ __version__ = "0.01"
+ __description__ = """DuckCrypt.Info Container Plugin"""
+ __author_name__ = ("godofdream")
+ __author_mail__ = ("soilfiction@gmail.com")
+
+ TIMER_PATTERN = r'<span id="timer">(.*)</span>'
+
+ def decrypt(self, pyfile):
+ url = pyfile.url
+ # seems we don't need to wait
+ #src = self.req.load(str(url))
+ #found = re.search(self.TIMER_PATTERN, src)
+ #if found:
+ # self.logDebug("Sleeping for" % found.group(1))
+ # self.setWait(int(found.group(1)) ,False)
+ found = re.search(self.__pattern__, url)
+ if not found:
+ self.fail('Weird error in link')
+ if str(found.group(1)) == "link":
+ self.handleLink(url)
+ else:
+ self.handleFolder(found)
+
+
+
+ def handleFolder(self, found):
+ src = self.load("http://duckcrypt.info/ajax/auth.php?hash=" + str(found.group(2)))
+ found = re.search(self.__pattern__, src)
+ self.logDebug("Redirectet to " + str(found.group(0)))
+ src = self.load(str(found.group(0)))
+ soup = BeautifulSoup(src)
+ cryptlinks = soup.find("div", attrs={"class": "folderbox"}).findAll("a")
+ self.logDebug("Redirectet to " + str(cryptlinks))
+ if not cryptlinks:
+ self.fail('no links found - (Plugin out of date?)')
+ for clink in cryptlinks:
+ self.handleLink(clink['href'])
+
+ def handleLink(self, url):
+ src = self.load(url)
+ soup = BeautifulSoup(src)
+ link = soup.find("iframe")["src"]
+ if not link:
+ self.logDebug('no links found - (Plugin out of date?)')
+ else:
+ self.core.files.addLinks([link], self.pyfile.package().id)
+
diff --git a/module/plugins/crypter/TrailerzoneInfo.py b/module/plugins/crypter/TrailerzoneInfo.py
index e52c5429c..2683c2429 100644
--- a/module/plugins/crypter/TrailerzoneInfo.py
+++ b/module/plugins/crypter/TrailerzoneInfo.py
@@ -5,9 +5,9 @@ from module.plugins.Crypter import Crypter
class TrailerzoneInfo(Crypter):
__name__ = "TrailerzoneInfo"
- __type__ = "container"
+ __type__ = "crypter"
__pattern__ = r"http://(www\.)?trailerzone.info/.*?"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """TrailerZone.info Crypter Plugin"""
__author_name__ = ("godofdream")
__author_mail__ = ("soilfiction@gmail.com")