summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/crypter/DebugCrypter.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-29 21:07:28 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-29 21:07:28 +0100
commit8318540e162cccbb049bebebc5aca03384a1e4e9 (patch)
tree5b4dc38520a82b5c8044a026ab996be1d71a782e /pyload/plugins/crypter/DebugCrypter.py
parentadded auth to request class (diff)
downloadpyload-8318540e162cccbb049bebebc5aca03384a1e4e9.tar.xz
added progress type enum, new DebugCrypter + Hoster, little improvements for crypter api
Diffstat (limited to 'pyload/plugins/crypter/DebugCrypter.py')
-rw-r--r--pyload/plugins/crypter/DebugCrypter.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/pyload/plugins/crypter/DebugCrypter.py b/pyload/plugins/crypter/DebugCrypter.py
new file mode 100644
index 000000000..a10d7c8e7
--- /dev/null
+++ b/pyload/plugins/crypter/DebugCrypter.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+
+from random import randint
+from time import sleep
+
+from pyload.plugins.Crypter import Crypter
+
+class DebugCrypter(Crypter):
+ """ Generates link used by debug hoster to test the decrypt mechanism """
+
+ __version__ = 0.1
+ __pattern__ = r"^debug_crypter=(\d+)$"
+
+
+ def decryptURL(self, url):
+
+ m = self.pattern.search(url)
+ n = int(m.group(1))
+
+ sleep(randint(3, n if n > 2 else 3))
+
+ return ["debug_hoster=%d" % i for i in range(n)]
+
+
+
+
+
+
+