summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/accounts/CyberlockerCh.py35
-rw-r--r--module/plugins/accounts/EgoFilesCom.py44
-rw-r--r--module/plugins/accounts/HotfileCom.py74
3 files changed, 0 insertions, 153 deletions
diff --git a/module/plugins/accounts/CyberlockerCh.py b/module/plugins/accounts/CyberlockerCh.py
deleted file mode 100644
index 729975fb0..000000000
--- a/module/plugins/accounts/CyberlockerCh.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from module.plugins.internal.XFSPAccount import XFSPAccount
-from module.plugins.internal.SimpleHoster import parseHtmlForm
-
-
-class CyberlockerCh(XFSPAccount):
- __name__ = "CyberlockerCh"
- __type__ = "account"
- __version__ = "0.01"
-
- __description__ = """Cyberlocker.ch account plugin"""
- __author_name__ = "stickell"
- __author_mail__ = "l.stickell@yahoo.it"
-
- MAIN_PAGE = "http://cyberlocker.ch/"
-
-
- def login(self, user, data, req):
- html = req.load(self.MAIN_PAGE + 'login.html', decode=True)
-
- action, inputs = parseHtmlForm('name="FL"', html)
- if not inputs:
- inputs = {"op": "login",
- "redirect": self.MAIN_PAGE}
-
- inputs.update({"login": user,
- "password": data['password']})
-
- # Without this a 403 Forbidden is returned
- req.http.lastURL = self.MAIN_PAGE + 'login.html'
- html = req.load(self.MAIN_PAGE, post=inputs, decode=True)
-
- if 'Incorrect Login or Password' in html or '>Error<' in html:
- self.wrongPassword()
diff --git a/module/plugins/accounts/EgoFilesCom.py b/module/plugins/accounts/EgoFilesCom.py
deleted file mode 100644
index fc263e776..000000000
--- a/module/plugins/accounts/EgoFilesCom.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-import time
-
-from module.plugins.Account import Account
-from module.utils import parseFileSize
-
-
-class EgoFilesCom(Account):
- __name__ = "EgoFilesCom"
- __type__ = "account"
- __version__ = "0.2"
-
- __description__ = """Egofiles.com account plugin"""
- __author_name__ = "stickell"
- __author_mail__ = "l.stickell@yahoo.it"
-
- PREMIUM_ACCOUNT_PATTERN = '<br/>\s*Premium: (?P<P>[^/]*) / Traffic left: (?P<T>[\d.]*) (?P<U>\w*)\s*\\n\s*<br/>'
-
-
- def loadAccountInfo(self, user, req):
- html = req.load("http://egofiles.com")
- if 'You are logged as a Free User' in html:
- return {"premium": False, "validuntil": None, "trafficleft": None}
-
- m = re.search(self.PREMIUM_ACCOUNT_PATTERN, html)
- if m:
- validuntil = int(time.mktime(time.strptime(m.group('P'), "%Y-%m-%d %H:%M:%S")))
- trafficleft = parseFileSize(m.group('T'), m.group('U')) / 1024
- return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft}
- else:
- self.logError("Unable to retrieve account information - Plugin may be out of date")
-
- def login(self, user, data, req):
- # Set English language
- req.load("https://egofiles.com/ajax/lang.php?lang=en", just_header=True)
-
- html = req.load("http://egofiles.com/ajax/register.php",
- post={"log": 1,
- "loginV": user,
- "passV": data['password']})
- if 'Login successful' not in html:
- self.wrongPassword()
diff --git a/module/plugins/accounts/HotfileCom.py b/module/plugins/accounts/HotfileCom.py
deleted file mode 100644
index cffbbab8f..000000000
--- a/module/plugins/accounts/HotfileCom.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from time import strptime, mktime
-import hashlib
-
-from module.plugins.Account import Account
-
-
-class HotfileCom(Account):
- __name__ = "HotfileCom"
- __type__ = "account"
- __version__ = "0.2"
-
- __description__ = """Hotfile.com account plugin"""
- __author_name__ = ("mkaay", "JoKoT3")
- __author_mail__ = ("mkaay@mkaay.de", "jokot3@gmail.com")
-
-
- def loadAccountInfo(self, user, req):
- resp = self.apiCall("getuserinfo", user=user)
- if resp.startswith("."):
- self.core.debug("HotfileCom API Error: %s" % resp)
- raise Exception
- info = {}
- for p in resp.split("&"):
- key, value = p.split("=")
- info[key] = value
-
- if info['is_premium'] == '1':
- info['premium_until'] = info['premium_until'].replace("T", " ")
- zone = info['premium_until'][19:]
- info['premium_until'] = info['premium_until'][:19]
- zone = int(zone[:3])
-
- validuntil = int(mktime(strptime(info['premium_until'], "%Y-%m-%d %H:%M:%S"))) + (zone * 60 * 60)
- tmp = {"validuntil": validuntil, "trafficleft": -1, "premium": True}
-
- elif info['is_premium'] == '0':
- tmp = {"premium": False}
-
- return tmp
-
- def apiCall(self, method, post={}, user=None):
- if user:
- data = self.getAccountData(user)
- else:
- user, data = self.selectAccount()
-
- req = self.getAccountRequest(user)
-
- digest = req.load("http://api.hotfile.com/", post={"action": "getdigest"})
- h = hashlib.md5()
- h.update(data['password'])
- hp = h.hexdigest()
- h = hashlib.md5()
- h.update(hp)
- h.update(digest)
- pwhash = h.hexdigest()
-
- post.update({"action": method})
- post.update({"username": user, "passwordmd5dig": pwhash, "digest": digest})
- resp = req.load("http://api.hotfile.com/", post=post)
- req.close()
- return resp
-
- def login(self, user, data, req):
- cj = self.getAccountCookies(user)
- cj.setCookie("hotfile.com", "lang", "en")
- req.load("http://hotfile.com/", cookies=True)
- page = req.load("http://hotfile.com/login.php", post={"returnto": "/", "user": user, "pass": data['password']},
- cookies=True)
-
- if "Bad username/password" in page:
- self.wrongPassword()