summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-15 23:57:03 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-15 23:57:03 +0200
commit0ecdab0c48c89c065ce41e3427d218f993a655ac (patch)
tree9d3e15eea7a899740f1a3cec8d1fa440724d2508 /module/plugins/crypter
parent[UpdateManager] Fix https://github.com/pyload/pyload/issues/687 (diff)
downloadpyload-0ecdab0c48c89c065ce41e3427d218f993a655ac.tar.xz
[StealthTo] Mark dead
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/StealthTo.py44
1 files changed, 4 insertions, 40 deletions
diff --git a/module/plugins/crypter/StealthTo.py b/module/plugins/crypter/StealthTo.py
index d0820446e..9cae7ba20 100644
--- a/module/plugins/crypter/StealthTo.py
+++ b/module/plugins/crypter/StealthTo.py
@@ -1,51 +1,15 @@
# -*- coding: utf-8 -*-
-import re
+from module.plugins.internal.DeadCrypter import DeadCrypter
-from module.plugins.Crypter import Crypter
-
-class StealthTo(Crypter):
+class StealthTo(DeadCrypter):
__name__ = "StealthTo"
- __version__ = "0.1"
+ __version__ = "0.2"
__type__ = "crypter"
- __pattern__ = r'http://(?:www\.)?stealth.to/folder/'
+ __pattern__ = r'http://(?:www\.)?stealth\.to/folder/.+'
__description__ = """Stealth.to decrypter plugin"""
__author_name__ = "spoob"
__author_mail__ = "spoob@pyload.org"
-
-
- def __init__(self, parent):
- Crypter.__init__(self, parent)
- self.parent = parent
- self.html = None
-
- def file_exists(self):
- """ returns True or False
- """
- return True
-
- def proceed(self, url, location):
- url = self.parent.url
- self.html = self.req.load(url, cookies=True)
- temp_links = []
- ids = []
- ats = [] # authenticity_token
- inputs = re.findall(r"(<(input|form)[^>]+)", self.html)
- for input in inputs:
- if re.search(r"name=\"authenticity_token\"", input[0]):
- ats.append(re.search(r"value=\"([^\"]+)", input[0]).group(1))
- if re.search(r"name=\"id\"", input[0]):
- ids.append(re.search(r"value=\"([^\"]+)", input[0]).group(1))
-
- for i in xrange(0, len(ids)):
- self.req.load(url + "/web",
- post={"authenticity_token": ats[i], "id": str(ids[i]), "link": ("download_" + str(ids[i]))},
- cookies=True)
- new_html = self.req.load(url + "/web", post={"authenticity_token": ats[i], "id": str(ids[i]), "link": "1"},
- cookies=True)
- temp_links.append(re.search(r"iframe src=\"(.*)\" frameborder", new_html).group(1))
-
- self.links = temp_links