summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hook
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hook')
-rw-r--r--pyload/plugins/hook/AlldebridCom.py27
-rw-r--r--pyload/plugins/hook/BypassCaptcha.py133
-rw-r--r--pyload/plugins/hook/Captcha9kw.py253
-rw-r--r--pyload/plugins/hook/CaptchaBrotherhood.py166
-rw-r--r--pyload/plugins/hook/DeathByCaptcha.py213
-rw-r--r--pyload/plugins/hook/DebridItaliaCom.py27
-rw-r--r--pyload/plugins/hook/EasybytezCom.py39
-rw-r--r--pyload/plugins/hook/ExpertDecoders.py92
-rw-r--r--pyload/plugins/hook/FastixRu.py28
-rw-r--r--pyload/plugins/hook/FreeWayMe.py25
-rw-r--r--pyload/plugins/hook/ImageTyperz.py151
-rw-r--r--pyload/plugins/hook/LinkdecrypterCom.py60
-rw-r--r--pyload/plugins/hook/LinksnappyCom.py27
-rw-r--r--pyload/plugins/hook/MegaDebridEu.py30
-rw-r--r--pyload/plugins/hook/MultishareCz.py27
-rw-r--r--pyload/plugins/hook/MyfastfileCom.py30
-rw-r--r--pyload/plugins/hook/OverLoadMe.py29
-rw-r--r--pyload/plugins/hook/PremiumTo.py38
-rw-r--r--pyload/plugins/hook/PremiumizeMe.py54
-rw-r--r--pyload/plugins/hook/RPNetBiz.py52
-rw-r--r--pyload/plugins/hook/RealdebridCom.py27
-rw-r--r--pyload/plugins/hook/RehostTo.py41
-rw-r--r--pyload/plugins/hook/SimplyPremiumCom.py29
-rw-r--r--pyload/plugins/hook/SimplydebridCom.py22
-rw-r--r--pyload/plugins/hook/UnrestrictLi.py30
-rw-r--r--pyload/plugins/hook/XFileSharingPro.py96
-rw-r--r--pyload/plugins/hook/ZeveraCom.py22
-rw-r--r--pyload/plugins/hook/__init__.py1
28 files changed, 0 insertions, 1769 deletions
diff --git a/pyload/plugins/hook/AlldebridCom.py b/pyload/plugins/hook/AlldebridCom.py
deleted file mode 100644
index a5312345b..000000000
--- a/pyload/plugins/hook/AlldebridCom.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class AlldebridCom(MultiHoster):
- __name = "AlldebridCom"
- __type = "hook"
- __version = "0.13"
-
- __config = [("https", "bool", "Enable HTTPS", False),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to stanard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """Alldebrid.com hook plugin"""
- __license = "GPLv3"
- __authors = [("Andy Voigt", "spamsales@online.de")]
-
-
- def getHoster(self):
- https = "https" if self.getConfig("https") else "http"
- page = getURL(https + "://www.alldebrid.com/api.php", get={'action': "get_host"}).replace("\"", "").strip()
-
- return [x.strip() for x in page.split(",") if x.strip()]
diff --git a/pyload/plugins/hook/BypassCaptcha.py b/pyload/plugins/hook/BypassCaptcha.py
deleted file mode 100644
index 9c6d662e0..000000000
--- a/pyload/plugins/hook/BypassCaptcha.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pycurl import FORM_FILE, LOW_SPEED_TIME
-
-from pyload.network.HTTPRequest import BadHeader
-from pyload.network.RequestFactory import getURL, getRequest
-from pyload.plugins.Addon import Addon
-
-
-class BypassCaptchaException(Exception):
-
- def __init__(self, err):
- self.err = err
-
-
- def getCode(self):
- return self.err
-
-
- def __str__(self):
- return "<BypassCaptchaException %s>" % self.err
-
-
- def __repr__(self):
- return "<BypassCaptchaException %s>" % self.err
-
-
-class BypassCaptcha(Addon):
- __name = "BypassCaptcha"
- __type = "hook"
- __version = "0.05"
-
- __config = [("force", "bool", "Force BC even if client is connected", False),
- ("passkey", "password", "Passkey", "")]
-
- __description = """Send captchas to BypassCaptcha.com"""
- __license = "GPLv3"
- __authors = [("RaNaN", "RaNaN@pyload.org"),
- ("Godofdream", "soilfcition@gmail.com"),
- ("zoidberg", "zoidberg@mujmail.cz")]
-
-
- PYLOAD_KEY = "4f771155b640970d5607f919a615bdefc67e7d32"
-
- SUBMIT_URL = "http://bypasscaptcha.com/upload.php"
- RESPOND_URL = "http://bypasscaptcha.com/check_value.php"
- GETCREDITS_URL = "http://bypasscaptcha.com/ex_left.php"
-
-
- def getCredits(self):
- res = getURL(self.GETCREDITS_URL, post={"key": self.getConfig("passkey")})
-
- data = dict(x.split(' ', 1) for x in res.splitlines())
- return int(data['Left'])
-
-
- def submit(self, captcha, captchaType="file", match=None):
- req = getRequest()
-
- #raise timeout threshold
- req.c.setopt(LOW_SPEED_TIME, 80)
-
- try:
- res = req.load(self.SUBMIT_URL,
- post={'vendor_key': self.PYLOAD_KEY,
- 'key': self.getConfig("passkey"),
- 'gen_task_id': "1",
- 'file': (FORM_FILE, captcha)},
- multipart=True)
- finally:
- req.close()
-
- data = dict(x.split(' ', 1) for x in res.splitlines())
- if not data or "Value" not in data:
- raise BypassCaptchaException(res)
-
- result = data['Value']
- ticket = data['TaskId']
- self.logDebug("Result %s : %s" % (ticket, result))
-
- return ticket, result
-
-
- def respond(self, ticket, success):
- try:
- res = getURL(self.RESPOND_URL, post={"task_id": ticket, "key": self.getConfig("passkey"),
- "cv": 1 if success else 0})
- except BadHeader, e:
- self.logError(_("Could not send response"), e)
-
-
- def captchaTask(self, task):
- if "service" in task.data:
- return False
-
- if not task.isTextual():
- return False
-
- if not self.getConfig("passkey"):
- return False
-
- if self.core.isClientConnected() and not self.getConfig("force"):
- return False
-
- if self.getCredits() > 0:
- task.handler.append(self)
- task.data['service'] = self.__name
- task.setWaiting(100)
- self.processCaptcha(task)
- else:
- self.logInfo(_("Your %s account has not enough credits") % self.__name)
-
-
- def captchaCorrect(self, task):
- if task.data['service'] == self.__name and "ticket" in task.data:
- self.respond(task.data['ticket'], True)
-
-
- def captchaInvalid(self, task):
- if task.data['service'] == self.__name and "ticket" in task.data:
- self.respond(task.data['ticket'], False)
-
-
- def processCaptcha(self, task):
- c = task.captchaFile
- try:
- ticket, result = self.submit(c)
- except BypassCaptchaException, e:
- task.error = e.getCode()
- return
-
- task.data['ticket'] = ticket
- task.setResult(result)
diff --git a/pyload/plugins/hook/Captcha9kw.py b/pyload/plugins/hook/Captcha9kw.py
deleted file mode 100644
index 2fc098473..000000000
--- a/pyload/plugins/hook/Captcha9kw.py
+++ /dev/null
@@ -1,253 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from __future__ import with_statement
-
-import re
-
-from base64 import b64encode
-from time import sleep
-
-from pyload.network.HTTPRequest import BadHeader
-from pyload.network.RequestFactory import getURL
-
-from pyload.plugins.Addon import Addon
-
-
-class Captcha9kw(Addon):
- __name = "Captcha9kw"
- __type = "hook"
- __version = "0.26"
-
- __config = [("ssl" , "bool" , "Use HTTPS" , True ),
- ("force" , "bool" , "Force captcha resolving even if client is connected" , True ),
- ("confirm" , "bool" , "Confirm Captcha (cost +6 credits)" , False ),
- ("captchaperhour", "int" , "Captcha per hour" , "9999" ),
- ("captchapermin" , "int" , "Captcha per minute" , "9999" ),
- ("prio" , "int" , "Priority (max 10)(cost +0 -> +10 credits)" , "0" ),
- ("queue" , "int" , "Max. Queue (max 999)" , "50" ),
- ("hoster_options", "string" , "Hoster options (format: pluginname:prio=1:selfsolfe=1:confirm=1:timeout=900|...)", "ShareonlineBiz:prio=0:timeout=999 | UploadedTo:prio=0:timeout=999"),
- ("selfsolve" , "bool" , "Selfsolve (manually solve your captcha in your 9kw client if active)" , "0" ),
- ("passkey" , "password", "API key" , "" ),
- ("timeout" , "int" , "Timeout in seconds (min 60, max 3999)" , "900" )]
-
- __description = """Send captchas to 9kw.eu"""
- __license = "GPLv3"
- __authors = [("RaNaN", "RaNaN@pyload.org"),
- ("Walter Purcaro", "vuolter@gmail.com")]
-
-
- API_URL = "http://www.9kw.eu/index.cgi"
-
-
- def activate(self):
- if self.getConfig("ssl"):
- self.API_URL = self.API_URL.replace("http://", "https://")
-
-
- def getCredits(self):
- res = getURL(self.API_URL,
- get={'apikey': self.getConfig("passkey"),
- 'pyload': "1",
- 'source': "pyload",
- 'action': "usercaptchaguthaben"})
-
- if res.isdigit():
- self.logInfo(_("%s credits left") % res)
- credits = self.info['credits'] = int(res)
- return credits
- else:
- self.logError(res)
- return 0
-
-
- def _processCaptcha(self, task):
- try:
- with open(task.captchaFile, 'rb') as f:
- data = f.read()
-
- except IOError, e:
- self.logError(e)
- return
-
- data = b64encode(data)
- mouse = 1 if task.isPositional() else 0
- pluginname = re.search(r'_([^_]*)_\d+.\w+', task.captchaFile).group(1)
-
- option = {'min' : 2,
- 'max' : 50,
- 'phrase' : 0,
- 'numeric' : 0,
- 'case_sensitive': 0,
- 'math' : 0,
- 'prio' : min(max(self.getConfig("prio"), 0), 10),
- 'confirm' : self.getConfig("confirm"),
- 'timeout' : min(max(self.getConfig("timeout"), 300), 3999),
- 'selfsolve' : self.getConfig("selfsolve"),
- 'cph' : self.getConfig("captchaperhour"),
- 'cpm' : self.getConfig("captchapermin")}
-
- for opt in str(self.getConfig("hoster_options").split('|')):
-
- details = map(str.strip, opt.split(':'))
-
- if not details or details[0].lower() != pluginname.lower():
- continue
-
- for d in details:
- hosteroption = d.split("=")
-
- if len(hosteroption) < 2 or not hosteroption[1].isdigit():
- continue
-
- o = hosteroption[0].lower()
- if o in option:
- option[o] = hosteroption[1]
-
- break
-
- post_data = {'apikey' : self.getConfig("passkey"),
- 'prio' : option['prio'],
- 'confirm' : option['confirm'],
- 'maxtimeout' : option['timeout'],
- 'selfsolve' : option['selfsolve'],
- 'captchaperhour': option['cph'],
- 'captchapermin' : option['cpm'],
- 'case-sensitive': option['case_sensitive'],
- 'min_len' : option['min'],
- 'max_len' : option['max'],
- 'phrase' : option['phrase'],
- 'numeric' : option['numeric'],
- 'math' : option['math'],
- 'oldsource' : pluginname,
- 'pyload' : "1",
- 'source' : "pyload",
- 'base64' : "1",
- 'mouse' : mouse,
- 'file-upload-01': data,
- 'action' : "usercaptchaupload"}
-
- for _i in xrange(5):
- try:
- res = getURL(self.API_URL, post=post_data)
- except BadHeader, e:
- sleep(3)
- else:
- if res and res.isdigit():
- break
- else:
- self.logError(_("Bad upload: %s") % res)
- return
-
- self.logDebug(_("NewCaptchaID ticket: %s") % res, task.captchaFile)
-
- task.data["ticket"] = res
-
- for _i in xrange(int(self.getConfig("timeout") / 5)):
- result = getURL(self.API_URL,
- get={'apikey': self.getConfig("passkey"),
- 'id' : res,
- 'pyload': "1",
- 'info' : "1",
- 'source': "pyload",
- 'action': "usercaptchacorrectdata"})
-
- if not result or result == "NO DATA":
- sleep(5)
- else:
- break
- else:
- self.logDebug("Could not send request: %s" % res)
- result = None
-
- self.logInfo(_("Captcha result for ticket %s: %s") % (res, result))
-
- task.setResult(result)
-
-
- def captchaTask(self, task):
- if not task.isTextual() and not task.isPositional():
- return
-
- if not self.getConfig("passkey"):
- return
-
- if self.core.isClientConnected() and not self.getConfig("force"):
- return
-
- credits = self.getCredits()
-
- if not credits:
- self.logError(_("Your captcha 9kw.eu account has not enough credits"))
- return
-
- queue = min(self.getConfig("queue"), 999)
- timeout = min(max(self.getConfig("timeout"), 300), 3999)
- pluginname = re.search(r'_([^_]*)_\d+.\w+', task.captchaFile).group(1)
-
- for _i in xrange(5):
- servercheck = getURL("http://www.9kw.eu/grafik/servercheck.txt")
- if queue < re.search(r'queue=(\d+)', servercheck).group(1):
- break
-
- sleep(10)
- else:
- self.fail(_("Too many captchas in queue"))
-
- for opt in str(self.getConfig("hoster_options").split('|')):
- details = map(str.strip, opt.split(':'))
-
- if not details or details[0].lower() != pluginname.lower():
- continue
-
- for d in details:
- hosteroption = d.split("=")
-
- if (len(hosteroption) > 1
- and hosteroption[0].lower() == 'timeout'
- and hosteroption[1].isdigit()):
- timeout = int(hosteroption[1])
-
- break
-
- task.handler.append(self)
-
- task.setWaiting(timeout)
-
- self._processCaptcha(task)
-
-
- def _captchaResponse(self, task, correct):
- type = "correct" if correct else "refund"
-
- if 'ticket' not in task.data:
- self.logDebug("No CaptchaID for %s request (task: %s)" % (type, task))
- return
-
- passkey = self.getConfig("passkey")
-
- for _i in xrange(3):
- res = getURL(self.API_URL,
- get={'action' : "usercaptchacorrectback",
- 'apikey' : passkey,
- 'api_key': passkey,
- 'correct': "1" if correct else "2",
- 'pyload' : "1",
- 'source' : "pyload",
- 'id' : task.data["ticket"]})
-
- self.logDebug("Request %s: %s" % (type, res))
-
- if res == "OK":
- break
-
- sleep(5)
- else:
- self.logDebug("Could not send %s request: %s" % (type, res))
-
-
- def captchaCorrect(self, task):
- self._captchaResponse(task, True)
-
-
- def captchaInvalid(self, task):
- self._captchaResponse(task, False)
diff --git a/pyload/plugins/hook/CaptchaBrotherhood.py b/pyload/plugins/hook/CaptchaBrotherhood.py
deleted file mode 100644
index 01c5588e3..000000000
--- a/pyload/plugins/hook/CaptchaBrotherhood.py
+++ /dev/null
@@ -1,166 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from __future__ import with_statement
-
-import StringIO
-import pycurl
-
-try:
- from PIL import Image
-except ImportError:
- import Image
-
-from time import sleep
-from urllib import urlencode
-
-from pyload.network.RequestFactory import getURL, getRequest
-from pyload.plugins.Addon import Addon
-
-
-class CaptchaBrotherhoodException(Exception):
-
- def __init__(self, err):
- self.err = err
-
-
- def getCode(self):
- return self.err
-
-
- def __str__(self):
- return "<CaptchaBrotherhoodException %s>" % self.err
-
-
- def __repr__(self):
- return "<CaptchaBrotherhoodException %s>" % self.err
-
-
-class CaptchaBrotherhood(Addon):
- __name = "CaptchaBrotherhood"
- __type = "hook"
- __version = "0.06"
-
- __config = [("username", "str", "Username", ""),
- ("force", "bool", "Force CT even if client is connected", False),
- ("passkey", "password", "Password", "")]
-
- __description = """Send captchas to CaptchaBrotherhood.com"""
- __license = "GPLv3"
- __authors = [("RaNaN", "RaNaN@pyload.org"),
- ("zoidberg", "zoidberg@mujmail.cz")]
-
-
- API_URL = "http://www.captchabrotherhood.com/"
-
-
- def getCredits(self):
- res = getURL(self.API_URL + "askCredits.aspx",
- get={"username": self.getConfig("username"), "password": self.getConfig("passkey")})
- if not res.startswith("OK"):
- raise CaptchaBrotherhoodException(res)
- else:
- credits = int(res[3:])
- self.logInfo(_("%d credits left") % credits)
- self.info['credits'] = credits
- return credits
-
-
- def submit(self, captcha, captchaType="file", match=None):
- try:
- img = Image.open(captcha)
- output = StringIO.StringIO()
- self.logDebug("CAPTCHA IMAGE", img, img.format, img.mode)
- if img.format in ("GIF", "JPEG"):
- img.save(output, img.format)
- else:
- if img.mode != "RGB":
- img = img.convert("RGB")
- img.save(output, "JPEG")
- data = output.getvalue()
- output.close()
- except Exception, e:
- raise CaptchaBrotherhoodException("Reading or converting captcha image failed: %s" % e)
-
- req = getRequest()
-
- url = "%ssendNewCaptcha.aspx?%s" % (self.API_URL,
- urlencode({"username": self.getConfig("username"),
- "password": self.getConfig("passkey"),
- "captchaSource": "pyLoad",
- "timeout": "80"}))
-
- req.c.setopt(pycurl.URL, url)
- req.c.setopt(pycurl.POST, 1)
- req.c.setopt(pycurl.POSTFIELDS, data)
- req.c.setopt(pycurl.HTTPHEADER, ["Content-Type: text/html"])
-
- try:
- req.c.perform()
- res = req.getResponse()
- except Exception, e:
- raise CaptchaBrotherhoodException("Submit captcha image failed")
-
- req.close()
-
- if not res.startswith("OK"):
- raise CaptchaBrotherhoodException(res[1])
-
- ticket = res[3:]
-
- for _i in xrange(15):
- sleep(5)
- res = self.get_api("askCaptchaResult", ticket)
- if res.startswith("OK-answered"):
- return ticket, res[12:]
-
- raise CaptchaBrotherhoodException("No solution received in time")
-
-
- def get_api(self, api, ticket):
- res = getURL("%s%s.aspx" % (self.API_URL, api),
- get={"username": self.getConfig("username"),
- "password": self.getConfig("passkey"),
- "captchaID": ticket})
- if not res.startswith("OK"):
- raise CaptchaBrotherhoodException("Unknown response: %s" % res)
-
- return res
-
-
- def captchaTask(self, task):
- if "service" in task.data:
- return False
-
- if not task.isTextual():
- return False
-
- if not self.getConfig("username") or not self.getConfig("passkey"):
- return False
-
- if self.core.isClientConnected() and not self.getConfig("force"):
- return False
-
- if self.getCredits() > 10:
- task.handler.append(self)
- task.data['service'] = self.__name
- task.setWaiting(100)
- self.processCaptcha(task)
- else:
- self.logInfo(_("Your CaptchaBrotherhood Account has not enough credits"))
-
-
- def captchaInvalid(self, task):
- if task.data['service'] == self.__name and "ticket" in task.data:
- res = self.get_api("complainCaptcha", task.data['ticket'])
-
-
- def processCaptcha(self, task):
- c = task.captchaFile
- try:
- ticket, result = self.submit(c)
- except CaptchaBrotherhoodException, e:
- task.error = e.getCode()
- return
-
- task.data['ticket'] = ticket
- task.setResult(result)
diff --git a/pyload/plugins/hook/DeathByCaptcha.py b/pyload/plugins/hook/DeathByCaptcha.py
deleted file mode 100644
index 9ab88127a..000000000
--- a/pyload/plugins/hook/DeathByCaptcha.py
+++ /dev/null
@@ -1,213 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from __future__ import with_statement
-
-import re
-
-from base64 import b64encode
-from pycurl import FORM_FILE, HTTPHEADER
-from time import sleep
-
-from pyload.utils import json_loads
-from pyload.network.HTTPRequest import BadHeader
-from pyload.network.RequestFactory import getRequest
-from pyload.plugins.Addon import Addon
-
-
-class DeathByCaptchaException(Exception):
- DBC_ERRORS = {'not-logged-in': 'Access denied, check your credentials',
- 'invalid-credentials': 'Access denied, check your credentials',
- 'banned': 'Access denied, account is suspended',
- 'insufficient-funds': 'Insufficient account balance to decrypt CAPTCHA',
- 'invalid-captcha': 'CAPTCHA is not a valid image',
- 'service-overload': 'CAPTCHA was rejected due to service overload, try again later',
- 'invalid-request': 'Invalid request',
- 'timed-out': 'No CAPTCHA solution received in time'}
-
-
- def __init__(self, err):
- self.err = err
-
-
- def getCode(self):
- return self.err
-
-
- def getDesc(self):
- if self.err in self.DBC_ERRORS.keys():
- return self.DBC_ERRORS[self.err]
- else:
- return self.err
-
-
- def __str__(self):
- return "<DeathByCaptchaException %s>" % self.err
-
-
- def __repr__(self):
- return "<DeathByCaptchaException %s>" % self.err
-
-
-class DeathByCaptcha(Addon):
- __name = "DeathByCaptcha"
- __type = "hook"
- __version = "0.04"
-
- __config = [("username", "str", "Username", ""),
- ("passkey", "password", "Password", ""),
- ("force", "bool", "Force DBC even if client is connected", False)]
-
- __description = """Send captchas to DeathByCaptcha.com"""
- __license = "GPLv3"
- __authors = [("RaNaN", "RaNaN@pyload.org"),
- ("zoidberg", "zoidberg@mujmail.cz")]
-
-
- API_URL = "http://api.dbcapi.me/api/"
-
-
- def call_api(self, api="captcha", post=False, multipart=False):
- req = getRequest()
- req.c.setopt(HTTPHEADER, ["Accept: application/json", "User-Agent: pyLoad %s" % self.core.version])
-
- if post:
- if not isinstance(post, dict):
- post = {}
- post.update({"username": self.getConfig("username"),
- "password": self.getConfig("passkey")})
-
- res = None
- try:
- json = req.load("%s%s" % (self.API_URL, api),
- post=post,
- multipart=multipart)
- self.logDebug(json)
- res = json_loads(json)
-
- if "error" in res:
- raise DeathByCaptchaException(res['error'])
- elif "status" not in res:
- raise DeathByCaptchaException(str(res))
-
- except BadHeader, e:
- if 403 == e.code:
- raise DeathByCaptchaException('not-logged-in')
- elif 413 == e.code:
- raise DeathByCaptchaException('invalid-captcha')
- elif 503 == e.code:
- raise DeathByCaptchaException('service-overload')
- elif e.code in (400, 405):
- raise DeathByCaptchaException('invalid-request')
- else:
- raise
-
- finally:
- req.close()
-
- return res
-
-
- def getCredits(self):
- res = self.call_api("user", True)
-
- if 'is_banned' in res and res['is_banned']:
- raise DeathByCaptchaException('banned')
- elif 'balance' in res and 'rate' in res:
- self.info.update(res)
- else:
- raise DeathByCaptchaException(res)
-
-
- def getStatus(self):
- res = self.call_api("status", False)
-
- if 'is_service_overloaded' in res and res['is_service_overloaded']:
- raise DeathByCaptchaException('service-overload')
-
-
- def submit(self, captcha, captchaType="file", match=None):
- #workaround multipart-post bug in HTTPRequest.py
- if re.match("^\w*$", self.getConfig("passkey")):
- multipart = True
- data = (FORM_FILE, captcha)
- else:
- multipart = False
- with open(captcha, 'rb') as f:
- data = f.read()
- data = "base64:" + b64encode(data)
-
- res = self.call_api("captcha", {"captchafile": data}, multipart)
-
- if "captcha" not in res:
- raise DeathByCaptchaException(res)
- ticket = res['captcha']
-
- for _i in xrange(24):
- sleep(5)
- res = self.call_api("captcha/%d" % ticket, False)
- if res['text'] and res['is_correct']:
- break
- else:
- raise DeathByCaptchaException('timed-out')
-
- result = res['text']
- self.logDebug("Result %s : %s" % (ticket, result))
-
- return ticket, result
-
-
- def captchaTask(self, task):
- if "service" in task.data:
- return False
-
- if not task.isTextual():
- return False
-
- if not self.getConfig("username") or not self.getConfig("passkey"):
- return False
-
- if self.core.isClientConnected() and not self.getConfig("force"):
- return False
-
- try:
- self.getStatus()
- self.getCredits()
- except DeathByCaptchaException, e:
- self.logError(e.getDesc())
- return False
-
- balance, rate = self.info['balance'], self.info['rate']
- self.logInfo(_("Account balance"),
- _("US$%.3f (%d captchas left at %.2f cents each)") % (balance / 100,
- balance // rate, rate))
-
- if balance > rate:
- task.handler.append(self)
- task.data['service'] = self.__name
- task.setWaiting(180)
- self.processCaptcha(task)
-
-
- def captchaInvalid(self, task):
- if task.data['service'] == self.__name and "ticket" in task.data:
- try:
- res = self.call_api("captcha/%d/report" % task.data['ticket'], True)
-
- except DeathByCaptchaException, e:
- self.logError(e.getDesc())
-
- except Exception, e:
- self.logError(e)
-
-
- def processCaptcha(self, task):
- c = task.captchaFile
- try:
- ticket, result = self.submit(c)
- except DeathByCaptchaException, e:
- task.error = e.getCode()
- self.logError(e.getDesc())
- return
-
- task.data['ticket'] = ticket
- task.setResult(result)
diff --git a/pyload/plugins/hook/DebridItaliaCom.py b/pyload/plugins/hook/DebridItaliaCom.py
deleted file mode 100644
index ee00fc375..000000000
--- a/pyload/plugins/hook/DebridItaliaCom.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class DebridItaliaCom(MultiHoster):
- __name = "DebridItaliaCom"
- __type = "hook"
- __version = "0.08"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to standard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """Debriditalia.com hook plugin"""
- __license = "GPLv3"
- __authors = [("stickell", "l.stickell@yahoo.it"),
- ("Walter Purcaro", "vuolter@gmail.com")]
-
-
- def getHoster(self):
- html = getURL("http://www.debriditalia.com/status.php")
- return re.findall(r'title="(.+?)"> \1</td><td><img src="/images/(?:attivo|testing)', html)
diff --git a/pyload/plugins/hook/EasybytezCom.py b/pyload/plugins/hook/EasybytezCom.py
deleted file mode 100644
index e24c82a9f..000000000
--- a/pyload/plugins/hook/EasybytezCom.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class EasybytezCom(MultiHoster):
- __name = "EasybytezCom"
- __type = "hook"
- __version = "0.03"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", "")]
-
- __description = """EasyBytez.com hook plugin"""
- __license = "GPLv3"
- __authors = [("zoidberg", "zoidberg@mujmail.cz")]
-
-
- def getHoster(self):
- self.account = self.core.accountManager.getAccountPlugin(self.__name)
- user = self.account.selectAccount()[0]
-
- try:
- req = self.account.getAccountRequest(user)
- page = req.load("http://www.easybytez.com")
-
- hosters = re.search(r'</textarea>\s*Supported sites:(.*)', page).group(1).split(',')
-
- except Exception, e:
- self.logWarning(_("Unable to load supported hoster list, using last known"))
- self.logDebug(e)
-
- hosters = ["bitshare.com", "crocko.com", "ddlstorage.com", "depositfiles.com", "extabit.com", "hotfile.com",
- "mediafire.com", "netload.in", "rapidgator.net", "rapidshare.com", "uploading.com", "uload.to",
- "uploaded.to"]
- finally:
- return hosters
diff --git a/pyload/plugins/hook/ExpertDecoders.py b/pyload/plugins/hook/ExpertDecoders.py
deleted file mode 100644
index 746dcf246..000000000
--- a/pyload/plugins/hook/ExpertDecoders.py
+++ /dev/null
@@ -1,92 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from __future__ import with_statement
-
-from base64 import b64encode
-from pycurl import LOW_SPEED_TIME
-from uuid import uuid4
-
-from pyload.network.HTTPRequest import BadHeader
-from pyload.network.RequestFactory import getURL, getRequest
-from pyload.plugins.Addon import Addon
-
-
-class ExpertDecoders(Addon):
- __name = "ExpertDecoders"
- __type = "hook"
- __version = "0.02"
-
- __config = [("force", "bool", "Force CT even if client is connected", False),
- ("passkey", "password", "Access key", "")]
-
- __description = """Send captchas to expertdecoders.com"""
- __license = "GPLv3"
- __authors = [("RaNaN", "RaNaN@pyload.org"),
- ("zoidberg", "zoidberg@mujmail.cz")]
-
-
- API_URL = "http://www.fasttypers.org/imagepost.ashx"
-
-
- def getCredits(self):
- res = getURL(self.API_URL, post={"key": self.getConfig("passkey"), "action": "balance"})
-
- if res.isdigit():
- self.logInfo(_("%s credits left") % res)
- self.info['credits'] = credits = int(res)
- return credits
- else:
- self.logError(res)
- return 0
-
-
- def processCaptcha(self, task):
- task.data['ticket'] = ticket = uuid4()
- result = None
-
- with open(task.captchaFile, 'rb') as f:
- data = f.read()
- data = b64encode(data)
-
- req = getRequest()
- #raise timeout threshold
- req.c.setopt(LOW_SPEED_TIME, 80)
-
- try:
- result = req.load(self.API_URL, post={"action": "upload", "key": self.getConfig("passkey"),
- "file": data, "gen_task_id": ticket})
- finally:
- req.close()
-
- self.logDebug("Result %s : %s" % (ticket, result))
- task.setResult(result)
-
-
- def captchaTask(self, task):
- if not task.isTextual():
- return False
-
- if not self.getConfig("passkey"):
- return False
-
- if self.core.isClientConnected() and not self.getConfig("force"):
- return False
-
- if self.getCredits() > 0:
- task.handler.append(self)
- task.setWaiting(100)
- self.processCaptcha(task)
- else:
- self.logInfo(_("Your ExpertDecoders Account has not enough credits"))
-
-
- def captchaInvalid(self, task):
- if "ticket" in task.data:
-
- try:
- res = getURL(self.API_URL,
- post={'action': "refund", 'key': self.getConfig("passkey"), 'gen_task_id': task.data['ticket']})
- self.logInfo(_("Request refund", res)
-
- except BadHeader, e:
- self.logError(_("Could not send refund request"), e)
diff --git a/pyload/plugins/hook/FastixRu.py b/pyload/plugins/hook/FastixRu.py
deleted file mode 100644
index bd3994243..000000000
--- a/pyload/plugins/hook/FastixRu.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.utils import json_loads
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class FastixRu(MultiHoster):
- __name = "FastixRu"
- __type = "hook"
- __version = "0.02"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("unloadFailing", "bool", "Revert to standard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """Fastix.ru hook plugin"""
- __license = "GPLv3"
- __authors = [("Massimo Rosamilia", "max@spiritix.eu")]
-
-
- def getHoster(self):
- page = getURL("http://fastix.ru/api_v2",
- get={'apikey': "5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y",
- 'sub' : "allowed_sources"})
- host_list = json_loads(page)
- host_list = host_list['allow']
- return host_list
diff --git a/pyload/plugins/hook/FreeWayMe.py b/pyload/plugins/hook/FreeWayMe.py
deleted file mode 100644
index 27297f77a..000000000
--- a/pyload/plugins/hook/FreeWayMe.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class FreeWayMe(MultiHoster):
- __name = "FreeWayMe"
- __type = "hook"
- __version = "0.11"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to stanard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """FreeWay.me hook plugin"""
- __license = "GPLv3"
- __authors = [("Nicolas Giese", "james@free-way.me")]
-
-
- def getHoster(self):
- hostis = getURL("https://www.free-way.me/ajax/jd.php", get={'id': 3}).replace("\"", "").strip()
- self.logDebug("Hosters", hostis)
- return [x.strip() for x in hostis.split(",") if x.strip()]
diff --git a/pyload/plugins/hook/ImageTyperz.py b/pyload/plugins/hook/ImageTyperz.py
deleted file mode 100644
index ea914ed23..000000000
--- a/pyload/plugins/hook/ImageTyperz.py
+++ /dev/null
@@ -1,151 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from __future__ import with_statement
-
-import re
-
-from base64 import b64encode
-from pycurl import FORM_FILE, LOW_SPEED_TIME
-
-from pyload.network.RequestFactory import getURL, getRequest
-from pyload.plugins.Addon import Addon
-
-
-class ImageTyperzException(Exception):
-
- def __init__(self, err):
- self.err = err
-
-
- def getCode(self):
- return self.err
-
-
- def __str__(self):
- return "<ImageTyperzException %s>" % self.err
-
-
- def __repr__(self):
- return "<ImageTyperzException %s>" % self.err
-
-
-class ImageTyperz(Addon):
- __name = "ImageTyperz"
- __type = "hook"
- __version = "0.05"
-
- __config = [("username", "str", "Username", ""),
- ("passkey", "password", "Password", ""),
- ("force", "bool", "Force IT even if client is connected", False)]
-
- __description = """Send captchas to ImageTyperz.com"""
- __license = "GPLv3"
- __authors = [("RaNaN", "RaNaN@pyload.org"),
- ("zoidberg", "zoidberg@mujmail.cz")]
-
-
- SUBMIT_URL = "http://captchatypers.com/Forms/UploadFileAndGetTextNEW.ashx"
- RESPOND_URL = "http://captchatypers.com/Forms/SetBadImage.ashx"
- GETCREDITS_URL = "http://captchatypers.com/Forms/RequestBalance.ashx"
-
-
- def getCredits(self):
- res = getURL(self.GETCREDITS_URL,
- post={'action': "REQUESTBALANCE",
- 'username': self.getConfig("username"),
- 'password': self.getConfig("passkey")})
-
- if res.startswith('ERROR'):
- raise ImageTyperzException(res)
-
- try:
- balance = float(res)
- except Exception:
- raise ImageTyperzException("Invalid response")
-
- self.logInfo(_("Account balance: $%s left") % res)
- return balance
-
-
- def submit(self, captcha, captchaType="file", match=None):
- req = getRequest()
- #raise timeout threshold
- req.c.setopt(LOW_SPEED_TIME, 80)
-
- try:
- #workaround multipart-post bug in HTTPRequest.py
- if re.match("^\w*$", self.getConfig("passkey")):
- multipart = True
- data = (FORM_FILE, captcha)
- else:
- multipart = False
- with open(captcha, 'rb') as f:
- data = f.read()
- data = b64encode(data)
-
- res = req.load(self.SUBMIT_URL,
- post={'action': "UPLOADCAPTCHA",
- 'username': self.getConfig("username"),
- 'password': self.getConfig("passkey"), "file": data},
- multipart=multipart)
- finally:
- req.close()
-
- if res.startswith("ERROR"):
- raise ImageTyperzException(res)
- else:
- data = res.split('|')
- if len(data) == 2:
- ticket, result = data
- else:
- raise ImageTyperzException("Unknown response: %s" % res)
-
- return ticket, result
-
-
- def captchaTask(self, task):
- if "service" in task.data:
- return False
-
- if not task.isTextual():
- return False
-
- if not self.getConfig("username") or not self.getConfig("passkey"):
- return False
-
- if self.core.isClientConnected() and not self.getConfig("force"):
- return False
-
- if self.getCredits() > 0:
- task.handler.append(self)
- task.data['service'] = self.__name
- task.setWaiting(100)
- self.processCaptcha(task)
- else:
- self.logInfo(_("Your %s account has not enough credits") % self.__name)
-
-
- def captchaInvalid(self, task):
- if task.data['service'] == self.__name and "ticket" in task.data:
- res = getURL(self.RESPOND_URL,
- post={'action': "SETBADIMAGE",
- 'username': self.getConfig("username"),
- 'password': self.getConfig("passkey"),
- 'imageid': task.data['ticket']})
-
- if res == "SUCCESS":
- self.logInfo(_("Bad captcha solution received, requested refund"))
- else:
- self.logError(_("Bad captcha solution received, refund request failed"), res)
-
-
- def processCaptcha(self, task):
- c = task.captchaFile
- try:
- ticket, result = self.submit(c)
- except ImageTyperzException, e:
- task.error = e.getCode()
- return
-
- task.data['ticket'] = ticket
- task.setResult(result)
diff --git a/pyload/plugins/hook/LinkdecrypterCom.py b/pyload/plugins/hook/LinkdecrypterCom.py
deleted file mode 100644
index ad3ace2a6..000000000
--- a/pyload/plugins/hook/LinkdecrypterCom.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.Addon import Addon
-from pyload.utils import remove_chars
-
-
-class LinkdecrypterCom(Addon):
- __name = "LinkdecrypterCom"
- __type = "hook"
- __version = "0.21"
-
- __description = """Linkdecrypter.com hook plugin"""
- __license = "GPLv3"
- __authors = [("zoidberg", "zoidberg@mujmail.cz")]
-
-
- def activate(self):
- try:
- self.loadPatterns()
- except Exception, e:
- self.logError(e)
-
-
- def loadPatterns(self):
- html = getURL("http://linkdecrypter.com/")
-
- m = re.search(r'<title>', html)
- if m is None:
- self.logError(_("Linkdecrypter site is down"))
- return
-
- m = re.search(r'<b>Supported\(\d+\)</b>: <i>([^+<]*)', html)
- if m is None:
- self.logError(_("Crypter list not found"))
- return
-
- builtin = [name.lower() for name in self.core.pluginManager.crypterPlugins.keys()]
- builtin.append("downloadserienjunkiesorg")
-
- crypter_pattern = re.compile("(\w[\w.-]+)")
- online = []
- for crypter in m.group(1).split(', '):
- m = re.match(crypter_pattern, crypter)
- if m and remove_chars(m.group(1), "-.") not in builtin:
- online.append(m.group(1).replace(".", "\\."))
-
- if not online:
- self.logError(_("Crypter list is empty"))
- return
-
- regexp = r'https?://([^.]+\.)*?(%s)/.*' % '|'.join(online)
-
- dict = self.core.pluginManager.crypterPlugins[self.__name]
- dict['pattern'] = regexp
- dict['re'] = re.compile(regexp)
-
- self.logDebug("Loaded pattern: %s" % regexp)
diff --git a/pyload/plugins/hook/LinksnappyCom.py b/pyload/plugins/hook/LinksnappyCom.py
deleted file mode 100644
index d34188987..000000000
--- a/pyload/plugins/hook/LinksnappyCom.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.utils import json_loads
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class LinksnappyCom(MultiHoster):
- __name = "LinksnappyCom"
- __type = "hook"
- __version = "0.01"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to standard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """Linksnappy.com hook plugin"""
- __license = "GPLv3"
- __authors = [("stickell", "l.stickell@yahoo.it")]
-
-
- def getHoster(self):
- json_data = getURL("http://gen.linksnappy.com/lseAPI.php", get={'act': "FILEHOSTS"})
- json_data = json_loads(json_data)
-
- return json_data['return'].keys()
diff --git a/pyload/plugins/hook/MegaDebridEu.py b/pyload/plugins/hook/MegaDebridEu.py
deleted file mode 100644
index 4fff41a51..000000000
--- a/pyload/plugins/hook/MegaDebridEu.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.utils import json_loads
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class MegaDebridEu(MultiHoster):
- __name = "MegaDebridEu"
- __type = "hook"
- __version = "0.02"
-
- __config = [("unloadFailing", "bool", "Revert to standard download if download fails", False)]
-
- __description = """mega-debrid.eu hook plugin"""
- __license = "GPLv3"
- __authors = [("D.Ducatel", "dducatel@je-geek.fr")]
-
-
- def getHoster(self):
- reponse = getURL("http://www.mega-debrid.eu/api.php", get={'action': "getHosters"})
- json_data = json_loads(reponse)
-
- if json_data['response_code'] == "ok":
- host_list = [element[0] for element in json_data['hosters']]
- else:
- self.logError(_("Unable to retrieve hoster list"))
- host_list = list()
-
- return host_list
diff --git a/pyload/plugins/hook/MultishareCz.py b/pyload/plugins/hook/MultishareCz.py
deleted file mode 100644
index 13906734f..000000000
--- a/pyload/plugins/hook/MultishareCz.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class MultishareCz(MultiHoster):
- __name = "MultishareCz"
- __type = "hook"
- __version = "0.04"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", "uloz.to")]
-
- __description = """MultiShare.cz hook plugin"""
- __license = "GPLv3"
- __authors = [("zoidberg", "zoidberg@mujmail.cz")]
-
-
- HOSTER_PATTERN = r'<img class="logo-shareserveru"[^>]*?alt="([^"]+)"></td>\s*<td class="stav">[^>]*?alt="OK"'
-
-
- def getHoster(self):
- page = getURL("http://www.multishare.cz/monitoring/")
- return re.findall(self.HOSTER_PATTERN, page)
diff --git a/pyload/plugins/hook/MyfastfileCom.py b/pyload/plugins/hook/MyfastfileCom.py
deleted file mode 100644
index bf07992f5..000000000
--- a/pyload/plugins/hook/MyfastfileCom.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-from pyload.utils import json_loads
-
-
-class MyfastfileCom(MultiHoster):
- __name = "MyfastfileCom"
- __type = "hook"
- __version = "0.02"
-
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to standard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """Myfastfile.com hook plugin"""
- __license = "GPLv3"
- __authors = [("stickell", "l.stickell@yahoo.it")]
-
-
-
- def getHoster(self):
- json_data = getURL("http://myfastfile.com/api.php", get={'hosts': ""}, decode=True)
- self.logDebug("JSON data", json_data)
- json_data = json_loads(json_data)
-
- return json_data['hosts']
diff --git a/pyload/plugins/hook/OverLoadMe.py b/pyload/plugins/hook/OverLoadMe.py
deleted file mode 100644
index caa9ef14c..000000000
--- a/pyload/plugins/hook/OverLoadMe.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class OverLoadMe(MultiHoster):
- __name = "OverLoadMe"
- __type = "hook"
- __version = "0.01"
-
- __config = [("https", "bool", "Enable HTTPS", True),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to standard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 12)]
-
- __description = """Over-Load.me hook plugin"""
- __license = "GPLv3"
- __authors = [("marley", "marley@over-load.me")]
-
-
- def getHoster(self):
- https = "https" if self.getConfig("https") else "http"
- page = getURL(https + "://api.over-load.me/hoster.php",
- get={'auth': "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}).replace("\"", "").strip()
- self.logDebug("Hosterlist", page)
-
- return [x.strip() for x in page.split(",") if x.strip()]
diff --git a/pyload/plugins/hook/PremiumTo.py b/pyload/plugins/hook/PremiumTo.py
deleted file mode 100644
index 6a4e4a644..000000000
--- a/pyload/plugins/hook/PremiumTo.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class PremiumTo(MultiHoster):
- __name = "PremiumTo"
- __type = "hook"
- __version = "0.04"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", "")]
-
- __description = """Premium.to hook plugin"""
- __license = "GPLv3"
- __authors = [("RaNaN", "RaNaN@pyload.org"),
- ("zoidberg", "zoidberg@mujmail.cz"),
- ("stickell", "l.stickell@yahoo.it")]
-
-
-
- def getHoster(self):
- page = getURL("http://premium.to/api/hosters.php",
- get={'username': self.account.username, 'password': self.account.password})
- return [x.strip() for x in page.replace("\"", "").split(";")]
-
-
- def activate(self):
- self.account = self.core.accountManager.getAccountPlugin("PremiumTo")
-
- user = self.account.selectAccount()[0]
-
- if not user:
- self.logError(_("Please add your premium.to account first and restart pyLoad"))
- return
-
- return MultiHoster.activate(self)
diff --git a/pyload/plugins/hook/PremiumizeMe.py b/pyload/plugins/hook/PremiumizeMe.py
deleted file mode 100644
index de887999f..000000000
--- a/pyload/plugins/hook/PremiumizeMe.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.utils import json_loads
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class PremiumizeMe(MultiHoster):
- __name = "PremiumizeMe"
- __type = "hook"
- __version = "0.12"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to stanard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """Premiumize.me hook plugin"""
- __license = "GPLv3"
- __authors = [("Florian Franzen", "FlorianFranzen@gmail.com")]
-
-
- def getHoster(self):
- # If no accounts are available there will be no hosters available
- if not self.account or not self.account.canUse():
- return []
-
- # Get account data
- (user, data) = self.account.selectAccount()
-
- # Get supported hosters list from premiumize.me using the
- # json API v1 (see https://secure.premiumize.me/?show=api)
- answer = getURL("https://api.premiumize.me/pm-api/v1.php"
- get={'method': "hosterlist", 'params[login]': user, 'params[pass]': data['password']})
- data = json_loads(answer)
-
- # If account is not valid thera are no hosters available
- if data['status'] != 200:
- return []
-
- # Extract hosters from json file
- return data['result']['hosterlist']
-
-
- def activate(self):
- # Get account plugin and check if there is a valid account available
- self.account = self.core.accountManager.getAccountPlugin("PremiumizeMe")
- if not self.account.canUse():
- self.account = None
- self.logError(_("Please add a valid premiumize.me account first and restart pyLoad"))
- return
-
- # Run the overwriten core ready which actually enables the multihoster hook
- return MultiHoster.activate(self)
diff --git a/pyload/plugins/hook/RPNetBiz.py b/pyload/plugins/hook/RPNetBiz.py
deleted file mode 100644
index 88e091d37..000000000
--- a/pyload/plugins/hook/RPNetBiz.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.utils import json_loads
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class RPNetBiz(MultiHoster):
- __name = "RPNetBiz"
- __type = "hook"
- __version = "0.10"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to stanard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """RPNet.biz hook plugin"""
- __license = "GPLv3"
- __authors = [("Dman", "dmanugm@gmail.com")]
-
-
- def getHoster(self):
- # No hosts supported if no account
- if not self.account or not self.account.canUse():
- return []
-
- # Get account data
- (user, data) = self.account.selectAccount()
-
- res = getURL("https://premium.rpnet.biz/client_api.php",
- get={'username': user, 'password': data['password'], 'action': "showHosterList"})
- hoster_list = json_loads(res)
-
- # If account is not valid thera are no hosters available
- if 'error' in hoster_list:
- return []
-
- # Extract hosters from json file
- return hoster_list['hosters']
-
-
- def activate(self):
- # Get account plugin and check if there is a valid account available
- self.account = self.core.accountManager.getAccountPlugin("RPNetBiz")
- if not self.account.canUse():
- self.account = None
- self.logError(_("Please enter your %s account or deactivate this plugin") % "rpnet")
- return
-
- # Run the overwriten core ready which actually enables the multihoster hook
- return MultiHoster.activate(self)
diff --git a/pyload/plugins/hook/RealdebridCom.py b/pyload/plugins/hook/RealdebridCom.py
deleted file mode 100644
index 01f7c4fad..000000000
--- a/pyload/plugins/hook/RealdebridCom.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class RealdebridCom(MultiHoster):
- __name = "RealdebridCom"
- __type = "hook"
- __version = "0.43"
-
- __config = [("https", "bool", "Enable HTTPS", False),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to stanard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """Real-Debrid.com hook plugin"""
- __license = "GPLv3"
- __authors = [("Devirex Hazzard", "naibaf_11@yahoo.de")]
-
-
- def getHoster(self):
- https = "https" if self.getConfig("https") else "http"
- page = getURL(https + "://real-debrid.com/api/hosters.php").replace("\"", "").strip()
-
- return [x.strip() for x in page.split(",") if x.strip()]
diff --git a/pyload/plugins/hook/RehostTo.py b/pyload/plugins/hook/RehostTo.py
deleted file mode 100644
index 3da17ea8f..000000000
--- a/pyload/plugins/hook/RehostTo.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class RehostTo(MultiHoster):
- __name = "RehostTo"
- __type = "hook"
- __version = "0.43"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to stanard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24)]
-
- __description = """Rehost.to hook plugin"""
- __license = "GPLv3"
- __authors = [("RaNaN", "RaNaN@pyload.org")]
-
-
- def getHoster(self):
- page = getURL("http://rehost.to/api.php",
- get={'cmd': "get_supported_och_dl", 'long_ses': self.long_ses})
- return [x.strip() for x in page.replace("\"", "").split(",")]
-
-
- def activate(self):
- self.account = self.core.accountManager.getAccountPlugin("RehostTo")
-
- user = self.account.selectAccount()[0]
-
- if not user:
- self.logError(_("Please add your rehost.to account first and restart pyLoad"))
- return
-
- data = self.account.getAccountInfo(user)
- self.ses = data['ses']
- self.long_ses = data['long_ses']
-
- return MultiHoster.activate(self)
diff --git a/pyload/plugins/hook/SimplyPremiumCom.py b/pyload/plugins/hook/SimplyPremiumCom.py
deleted file mode 100644
index b4e173521..000000000
--- a/pyload/plugins/hook/SimplyPremiumCom.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.utils import json_loads
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class SimplyPremiumCom(MultiHoster):
- __name = "SimplyPremiumCom"
- __type = "hook"
- __version = "0.02"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to standard download if download fails", "False"),
- ("interval", "int", "Reload interval in hours (0 to disable)", "24")]
-
- __description = """Simply-Premium.com hook plugin"""
- __license = "GPLv3"
- __authors = [("EvolutionClip", "evolutionclip@live.de")]
-
-
- def getHoster(self):
- json_data = getURL("http://www.simply-premium.com/api/hosts.php", get={'format': "json", 'online': 1})
- json_data = json_loads(json_data)
-
- host_list = [element['regex'] for element in json_data['result']]
-
- return host_list
diff --git a/pyload/plugins/hook/SimplydebridCom.py b/pyload/plugins/hook/SimplydebridCom.py
deleted file mode 100644
index a6e00aae0..000000000
--- a/pyload/plugins/hook/SimplydebridCom.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class SimplydebridCom(MultiHoster):
- __name = "SimplydebridCom"
- __type = "hook"
- __version = "0.01"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", "")]
-
- __description = """Simply-Debrid.com hook plugin"""
- __license = "GPLv3"
- __authors = [("Kagenoshin", "kagenoshin@gmx.ch")]
-
-
- def getHoster(self):
- page = getURL("http://simply-debrid.com/api.php", get={'list': 1})
- return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")]
diff --git a/pyload/plugins/hook/UnrestrictLi.py b/pyload/plugins/hook/UnrestrictLi.py
deleted file mode 100644
index d48e8587e..000000000
--- a/pyload/plugins/hook/UnrestrictLi.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.utils import json_loads
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class UnrestrictLi(MultiHoster):
- __name = "UnrestrictLi"
- __type = "hook"
- __version = "0.02"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to standard download if download fails", False),
- ("interval", "int", "Reload interval in hours (0 to disable)", 24),
- ("history", "bool", "Delete History", False)]
-
- __description = """Unrestrict.li hook plugin"""
- __license = "GPLv3"
- __authors = [("stickell", "l.stickell@yahoo.it")]
-
-
- def getHoster(self):
- json_data = getURL("http://unrestrict.li/api/jdownloader/hosts.php", get={'format': "json"})
- json_data = json_loads(json_data)
-
- host_list = [element['host'] for element in json_data['result']]
-
- return host_list
diff --git a/pyload/plugins/hook/XFileSharingPro.py b/pyload/plugins/hook/XFileSharingPro.py
deleted file mode 100644
index 28cc5f62d..000000000
--- a/pyload/plugins/hook/XFileSharingPro.py
+++ /dev/null
@@ -1,96 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from pyload.plugins.Addon import Addon
-
-
-class XFileSharingPro(Addon):
- __name = "XFileSharingPro"
- __type = "hook"
- __version = "0.26"
-
- __config = [("activated" , "bool", "Activated" , True ),
- ("use_hoster_list" , "bool", "Load listed hosters only" , True ),
- ("use_crypter_list", "bool", "Load listed crypters only" , False),
- ("use_builtin_list", "bool", "Load built-in plugin list" , True ),
- ("hoster_list" , "str" , "Hoster list (comma separated)" , "" ),
- ("crypter_list" , "str" , "Crypter list (comma separated)", "" )]
-
- __description = """Load XFileSharingPro based hosters and crypter which don't need a own plugin to run"""
- __license = "GPLv3"
- __authors = [("Walter Purcaro", "vuolter@gmail.com")]
-
-
- # event_list = ["pluginConfigChanged"]
- regexp = {'hoster' : (r'https?://(?:www\.)?([\w.^_]+(?:\.[a-zA-Z]{2,})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)',
- r'https?://(?:[^/]+\.)?(%s)/(?:embed-)?\w+'),
- 'crypter': (r'https?://(?:www\.)?([\w.^_]+(?:\.[a-zA-Z]{2,})(?:\:\d+)?)/(?:user|folder)s?/\w+',
- r'https?://(?:[^/]+\.)?(%s)/(?:user|folder)s?/\w+')}
-
- HOSTER_LIST = [#WORKING HOSTERS:
- "eyesfile.ca", "file4safe.com", "fileband.com", "filedwon.com", "filevice.com", "hostingbulk.com",
- "linestorage.com", "ravishare.com", "sharesix.com", "thefile.me", "verzend.be", "xvidstage.com",
- #NOT TESTED:
- "101shared.com", "4upfiles.com", "filemaze.ws", "filenuke.com", "linkzhost.com", "mightyupload.com",
- "rockdizfile.com", "sharebeast.com", "sharerepo.com", "shareswift.com", "uploadbaz.com", "uploadc.com",
- "vidbull.com", "zalaa.com", "zomgupload.com",
- #NOT WORKING:
- "amonshare.com", "banicrazy.info", "boosterking.com", "host4desi.com", "laoupload.com", "rd-fs.com"]
- CRYPTER_LIST = []
-
-
- # def pluginConfigChanged(self.__name, plugin, name, value):
- # self.loadPattern()
-
-
- def activate(self):
- self.loadPattern()
-
-
- def loadPattern(self):
- use_builtin_list = self.getConfig('use_builtin_list')
-
- for type in ("hoster", "crypter"):
- every_plugin = not self.getConfig("use_%s_list" % type)
-
- if every_plugin:
- self.logInfo(_("Handling any %s I can!") % type)
- pattern = self.regexp[type][0]
- else:
- s = self.getConfig('%s_list' % type).replace('\\', '').replace('|', ',').replace(';', ',').lower()
- plugin_list = set([x.strip() for x in s.split(',')])
-
- if use_builtin_list:
- plugin_list |= set([x.lower() for x in getattr(self, "%s_LIST" % type.upper())])
-
- plugin_list -= set(('', u''))
-
- if not plugin_list:
- self.logInfo(_("No %s to handle") % type)
- self._unload(type)
- return
-
- match_list = '|'.join(sorted(plugin_list))
-
- len_match_list = len(plugin_list)
- self.logInfo(_("Handling %d %s%s: %s") % (len_match_list, type, "" if len_match_list is 1 else "s", match_list.replace('|', ', ')))
-
- pattern = self.regexp[type][1] % match_list.replace('.', '\.')
-
- dict = self.core.pluginManager.plugins[type]["XFileSharingPro"]
- dict['pattern'] = pattern
- dict['re'] = re.compile(pattern)
-
- self.logDebug("Loaded %s pattern: %s" % (type, pattern))
-
-
- def _unload(self, type):
- dict = self.core.pluginManager.plugins[type]["XFileSharingPro"]
- dict['pattern'] = r'^unmatchable$'
- dict['re'] = re.compile(dict['pattern'])
-
-
- def deactivate(self):
- for type in ("hoster", "crypter"):
- self._unload(type, "XFileSharingPro")
diff --git a/pyload/plugins/hook/ZeveraCom.py b/pyload/plugins/hook/ZeveraCom.py
deleted file mode 100644
index 6ff99b142..000000000
--- a/pyload/plugins/hook/ZeveraCom.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from pyload.network.RequestFactory import getURL
-from pyload.plugins.internal.MultiHoster import MultiHoster
-
-
-class ZeveraCom(MultiHoster):
- __name = "ZeveraCom"
- __type = "hook"
- __version = "0.02"
-
- __config = [("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", "")]
-
- __description = """Real-Debrid.com hook plugin"""
- __license = "GPLv3"
- __authors = [("zoidberg", "zoidberg@mujmail.cz")]
-
-
- def getHoster(self):
- page = getURL("http://www.zevera.com/jDownloader.ashx", get={'cmd': "gethosters"})
- return [x.strip() for x in page.replace("\"", "").split(",")]
diff --git a/pyload/plugins/hook/__init__.py b/pyload/plugins/hook/__init__.py
deleted file mode 100644
index 40a96afc6..000000000
--- a/pyload/plugins/hook/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# -*- coding: utf-8 -*-