From 75b6540be746d66d3fba3ab364c78addbc50c485 Mon Sep 17 00:00:00 2001
From: Smoozed
Date: Mon, 5 Jan 2015 16:49:39 +0100
Subject: Added multihoster smoozed.com
---
module/plugins/accounts/SmoozedCom.py | 55 +++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
create mode 100644 module/plugins/accounts/SmoozedCom.py
(limited to 'module/plugins/accounts')
diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py
new file mode 100644
index 000000000..8157806c8
--- /dev/null
+++ b/module/plugins/accounts/SmoozedCom.py
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.Account import Account
+
+from module.common.json_layer import json_loads
+
+from time import time
+
+import hashlib
+from beaker.crypto.pbkdf2 import PBKDF2
+
+
+
+class SmoozedCom(Account):
+ __name__ = "SmoozedCom"
+ __type__ = "account"
+ __version__ = "0.01"
+
+ __description__ = """Smoozed.com account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = []
+
+
+ def loadAccountInfo(self, user, req):
+ # Get user data from premiumize.me
+ status = self.getAccountStatus(user, req)
+ self.logDebug(status)
+
+ # Parse account info
+ account_info = {"validuntil": float(status["data"]["user"]["user_premium"]),
+ "trafficleft": max(0, status["data"]["traffic"][1] - status["data"]["traffic"][0]),
+ "session_key": status["data"]["session_key"],
+ "hoster": [hoster["name"] for hoster in status["data"]["hoster"]]}
+
+ if account_info["validuntil"] < time():
+ account_info['premium'] = False
+ else:
+ account_info['premium'] = True
+
+ return account_info
+
+ def login(self, user, data, req):
+ # Get user data from premiumize.me
+ status = self.getAccountStatus(user, req)
+
+ # Check if user and password are valid
+ if status['state'] != 'ok':
+ self.wrongPassword()
+
+ def getAccountStatus(self, user, req):
+ salt = hashlib.sha256(self.accounts[user]['password']).hexdigest()
+ encrypted = PBKDF2(self.accounts[user]['password'], salt, iterations=1000).hexread(32)
+ answer = req.load('http://www2.smoozed.com/api/login?auth=%s&password=%s' % (
+ user, encrypted))
+ return json_loads(answer)
--
cgit v1.2.3
From 36e60a23497ae05736c24fed2f4ce936fb61f744 Mon Sep 17 00:00:00 2001
From: Walter Purcaro
Date: Thu, 8 Jan 2015 23:31:33 +0100
Subject: "New Year" Update: account plugins
---
module/plugins/accounts/AlldebridCom.py | 5 +-
module/plugins/accounts/BackinNet.py | 16 ++++++
module/plugins/accounts/BitshareCom.py | 6 ++-
module/plugins/accounts/CatShareNet.py | 5 +-
module/plugins/accounts/CloudzillaTo.py | 5 +-
module/plugins/accounts/CzshareCom.py | 12 ++---
module/plugins/accounts/DebridItaliaCom.py | 5 +-
module/plugins/accounts/DepositfilesCom.py | 6 ++-
module/plugins/accounts/EuroshareEu.py | 12 ++---
module/plugins/accounts/FastixRu.py | 5 +-
module/plugins/accounts/File4safeCom.py | 8 +--
module/plugins/accounts/FilecloudIo.py | 8 +--
module/plugins/accounts/FilefactoryCom.py | 10 ++--
module/plugins/accounts/FilejungleCom.py | 17 ++++---
module/plugins/accounts/FilerNet.py | 13 +++--
module/plugins/accounts/FilesMailRu.py | 14 ++++--
module/plugins/accounts/FourSharedCom.py | 33 -------------
module/plugins/accounts/FreakshareCom.py | 8 +--
module/plugins/accounts/FreeWayMe.py | 15 +++---
module/plugins/accounts/FshareVn.py | 20 ++++----
module/plugins/accounts/HellshareCz.py | 21 ++++----
module/plugins/accounts/HundredEightyUploadCom.py | 16 ------
module/plugins/accounts/Keep2shareCc.py | 33 +++++++------
module/plugins/accounts/LetitbitNet.py | 4 +-
module/plugins/accounts/LinksnappyCom.py | 14 ++++--
module/plugins/accounts/MegaRapidCz.py | 23 ++++-----
module/plugins/accounts/MegasharesCom.py | 14 +++---
module/plugins/accounts/MultihostersCom.py | 52 ++++----------------
module/plugins/accounts/MultishareCz.py | 12 ++---
module/plugins/accounts/MyfastfileCom.py | 6 ++-
module/plugins/accounts/NetloadIn.py | 12 +++--
module/plugins/accounts/NowVideoSx.py | 7 +--
module/plugins/accounts/OboomCom.py | 7 ++-
module/plugins/accounts/OneFichierCom.py | 55 ---------------------
module/plugins/accounts/PremiumTo.py | 5 +-
module/plugins/accounts/PremiumizeMe.py | 4 +-
module/plugins/accounts/PutdriveCom.py | 16 ++++++
module/plugins/accounts/QuickshareCz.py | 12 ++---
module/plugins/accounts/RPNetBiz.py | 4 +-
module/plugins/accounts/RapidgatorNet.py | 5 +-
module/plugins/accounts/RealdebridCom.py | 8 ++-
module/plugins/accounts/RehostTo.py | 9 ++--
module/plugins/accounts/ShareonlineBiz.py | 7 ++-
module/plugins/accounts/SimplyPremiumCom.py | 4 +-
module/plugins/accounts/SimplydebridCom.py | 7 +--
module/plugins/accounts/SmoozedCom.py | 53 +++++++++++---------
module/plugins/accounts/StahnuTo.py | 11 +++--
module/plugins/accounts/TurbobitNet.py | 11 +++--
module/plugins/accounts/UnrestrictLi.py | 6 +--
module/plugins/accounts/UploadableCh.py | 5 +-
module/plugins/accounts/UploadedTo.py | 9 ++--
module/plugins/accounts/UploadheroCom.py | 5 +-
module/plugins/accounts/YibaishiwuCom.py | 14 +++---
module/plugins/accounts/ZeveraCom.py | 53 +++++++++++---------
module/plugins/accounts/_180UploadCom.py | 16 ++++++
module/plugins/accounts/_1FichierCom.py | 60 +++++++++++++++++++++++
module/plugins/accounts/_4SharedCom.py | 34 +++++++++++++
57 files changed, 473 insertions(+), 384 deletions(-)
create mode 100644 module/plugins/accounts/BackinNet.py
delete mode 100644 module/plugins/accounts/FourSharedCom.py
delete mode 100644 module/plugins/accounts/HundredEightyUploadCom.py
delete mode 100644 module/plugins/accounts/OneFichierCom.py
create mode 100644 module/plugins/accounts/PutdriveCom.py
create mode 100644 module/plugins/accounts/_180UploadCom.py
create mode 100644 module/plugins/accounts/_1FichierCom.py
create mode 100644 module/plugins/accounts/_4SharedCom.py
(limited to 'module/plugins/accounts')
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py
index 278f3af06..1f2371e28 100644
--- a/module/plugins/accounts/AlldebridCom.py
+++ b/module/plugins/accounts/AlldebridCom.py
@@ -13,7 +13,7 @@ from module.plugins.Account import Account
class AlldebridCom(Account):
__name__ = "AlldebridCom"
__type__ = "account"
- __version__ = "0.22"
+ __version__ = "0.23"
__description__ = """AllDebrid.com account plugin"""
__license__ = "GPLv3"
@@ -55,7 +55,8 @@ class AlldebridCom(Account):
html = req.load("http://www.alldebrid.com/register/",
get={'action' : "login",
'login_login' : user,
- 'login_password': data['password']})
+ 'login_password': data['password']},
+ decode=True)
if "This login doesn't exist" in html \
or "The password is not valid" in html \
diff --git a/module/plugins/accounts/BackinNet.py b/module/plugins/accounts/BackinNet.py
new file mode 100644
index 000000000..46c8d7ac5
--- /dev/null
+++ b/module/plugins/accounts/BackinNet.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.internal.XFSAccount import XFSAccount
+
+
+class BackinNet(XFSAccount):
+ __name__ = "BackinNet"
+ __type__ = "account"
+ __version__ = "0.01"
+
+ __description__ = """Backin.net account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ HOSTER_DOMAIN = "backin.net"
diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py
index 960ff6c3c..412aae534 100644
--- a/module/plugins/accounts/BitshareCom.py
+++ b/module/plugins/accounts/BitshareCom.py
@@ -6,7 +6,7 @@ from module.plugins.Account import Account
class BitshareCom(Account):
__name__ = "BitshareCom"
__type__ = "account"
- __version__ = "0.12"
+ __version__ = "0.13"
__description__ = """Bitshare account plugin"""
__license__ = "GPLv3"
@@ -27,7 +27,9 @@ class BitshareCom(Account):
def login(self, user, data, req):
html = req.load("http://bitshare.com/login.html",
- post={"user": user, "password": data['password'], "submit": "Login"}, cookies=True)
+ post={"user": user, "password": data['password'], "submit": "Login"},
+ cookies=True,
+ decode=True)
if "login" in req.lastEffectiveURL:
self.wrongPassword()
diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py
index c33219685..bcb14bee3 100644
--- a/module/plugins/accounts/CatShareNet.py
+++ b/module/plugins/accounts/CatShareNet.py
@@ -10,7 +10,7 @@ from module.plugins.Account import Account
class CatShareNet(Account):
__name__ = "CatShareNet"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """CatShareNet account plugin"""
__license__ = "GPLv3"
@@ -50,7 +50,8 @@ class CatShareNet(Account):
post={'user_email': user,
'user_password': data['password'],
'remindPassword': 0,
- 'user[submit]': "Login"})
+ 'user[submit]': "Login"},
+ decode=True)
if not 'Wyloguj' in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/CloudzillaTo.py b/module/plugins/accounts/CloudzillaTo.py
index f0676f42f..d22d5e4b3 100644
--- a/module/plugins/accounts/CloudzillaTo.py
+++ b/module/plugins/accounts/CloudzillaTo.py
@@ -8,7 +8,7 @@ from module.plugins.Account import Account
class CloudzillaTo(Account):
__name__ = "CloudzillaTo"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Cloudzilla.to account plugin"""
__license__ = "GPLv3"
@@ -30,7 +30,8 @@ class CloudzillaTo(Account):
html = req.load("http://www.cloudzilla.to/",
post={'lusername': user,
'lpassword': data['password'],
- 'w' : "dologin"})
+ 'w' : "dologin"},
+ decode=True)
if "ERROR" in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py
index 414883228..f84bc67f3 100644
--- a/module/plugins/accounts/CzshareCom.py
+++ b/module/plugins/accounts/CzshareCom.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class CzshareCom(Account):
__name__ = "CzshareCom"
__type__ = "account"
- __version__ = "0.15"
+ __version__ = "0.16"
__description__ = """Czshare.com account plugin, now Sdilej.cz"""
__license__ = "GPLv3"
@@ -33,11 +33,11 @@ class CzshareCom(Account):
def login(self, user, data, req):
- html = req.load('https://sdilej.cz/index.php', post={
- "Prihlasit": "Prihlasit",
- "login-password": data['password'],
- "login-name": user
- })
+ html = req.load('https://sdilej.cz/index.php',
+ post={"Prihlasit": "Prihlasit",
+ "login-password": data['password'],
+ "login-name": user},
+ decode=True)
if 'Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.
' in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py
index c75f8ee33..f92a4e821 100644
--- a/module/plugins/accounts/EuroshareEu.py
+++ b/module/plugins/accounts/EuroshareEu.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class EuroshareEu(Account):
__name__ = "EuroshareEu"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Euroshare.eu account plugin"""
__license__ = "GPLv3"
@@ -31,11 +31,11 @@ class EuroshareEu(Account):
def login(self, user, data, req):
- html = req.load('http://euroshare.eu/customer-zone/login/', post={
- "trvale": "1",
- "login": user,
- "password": data['password']
- }, decode=True)
+ html = req.load('http://euroshare.eu/customer-zone/login/',
+ post={"trvale": "1",
+ "login": user,
+ "password": data['password']},
+ decode=True)
if u">Nesprávne prihlasovacie meno alebo heslo" in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py
index d33d611c9..51be3880f 100644
--- a/module/plugins/accounts/FastixRu.py
+++ b/module/plugins/accounts/FastixRu.py
@@ -7,7 +7,7 @@ from module.common.json_layer import json_loads
class FastixRu(Account):
__name__ = "FastixRu"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """Fastix account plugin"""
__license__ = "GPLv3"
@@ -31,8 +31,11 @@ class FastixRu(Account):
def login(self, user, data, req):
html = req.load("http://fastix.ru/api_v2/",
get={'sub': "get_apikey", 'email': user, 'password': data['password']})
+
api = json_loads(html)
api = api['apikey']
+
data['api'] = api
+
if "error_code" in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/File4safeCom.py b/module/plugins/accounts/File4safeCom.py
index 20053d895..50fe1aac8 100644
--- a/module/plugins/accounts/File4safeCom.py
+++ b/module/plugins/accounts/File4safeCom.py
@@ -3,12 +3,12 @@
from module.plugins.internal.XFSAccount import XFSAccount
-class File4safeCom(XFSAccount):
- __name__ = "File4safeCom"
+class File4SafeCom(XFSAccount):
+ __name__ = "File4SafeCom"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
- __description__ = """File4safe.com account plugin"""
+ __description__ = """File4Safe.com account plugin"""
__license__ = "GPLv3"
__authors__ = [("stickell", "l.stickell@yahoo.it")]
diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py
index d20f756f3..8ca55b1bc 100644
--- a/module/plugins/accounts/FilecloudIo.py
+++ b/module/plugins/accounts/FilecloudIo.py
@@ -7,7 +7,7 @@ from module.common.json_layer import json_loads
class FilecloudIo(Account):
__name__ = "FilecloudIo"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__description__ = """FilecloudIo account plugin"""
__license__ = "GPLv3"
@@ -19,7 +19,7 @@ class FilecloudIo(Account):
# It looks like the first API request always fails, so we retry 5 times, it should work on the second try
for _i in xrange(5):
rep = req.load("https://secure.filecloud.io/api-fetch_apikey.api",
- post={"username": user, "password": self.accounts[user]['password']})
+ post={"username": user, "password": self.getAccountData(user)['password']})
rep = json_loads(rep)
if rep['status'] == 'ok':
break
@@ -55,5 +55,5 @@ class FilecloudIo(Account):
post=self.form_data,
multipart=True)
- self.logged_in = True if "you have successfully logged in - filecloud.io" in html else False
- self.form_data = {}
+ if "you have successfully logged in" not in html:
+ self.wrongPassword()
diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py
index 8394c549e..426d572db 100644
--- a/module/plugins/accounts/FilefactoryCom.py
+++ b/module/plugins/accounts/FilefactoryCom.py
@@ -11,7 +11,7 @@ from module.plugins.Account import Account
class FilefactoryCom(Account):
__name__ = "FilefactoryCom"
__type__ = "account"
- __version__ = "0.14"
+ __version__ = "0.15"
__description__ = """Filefactory.com account plugin"""
__license__ = "GPLv3"
@@ -40,10 +40,10 @@ class FilefactoryCom(Account):
def login(self, user, data, req):
req.http.c.setopt(REFERER, "http://www.filefactory.com/member/login.php")
- html = req.load("http://www.filefactory.com/member/signin.php", post={
- "loginEmail": user,
- "loginPassword": data['password'],
- "Submit": "Sign In"})
+ html = req.load("http://www.filefactory.com/member/signin.php",
+ post={"loginEmail" : user,
+ "loginPassword": data['password'],
+ "Submit" : "Sign In"})
if req.lastEffectiveURL != "http://www.filefactory.com/account/":
self.wrongPassword()
diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py
index a3ec7af64..9f7474207 100644
--- a/module/plugins/accounts/FilejungleCom.py
+++ b/module/plugins/accounts/FilejungleCom.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class FilejungleCom(Account):
__name__ = "FilejungleCom"
__type__ = "account"
- __version__ = "0.11"
+ __version__ = "0.12"
__description__ = """Filejungle.com account plugin"""
__license__ = "GPLv3"
@@ -37,13 +37,14 @@ class FilejungleCom(Account):
def login(self, user, data, req):
- html = req.load(self.URL + "login.php", post={
- "loginUserName": user,
- "loginUserPassword": data['password'],
- "loginFormSubmit": "Login",
- "recaptcha_challenge_field": "",
- "recaptcha_response_field": "",
- "recaptcha_shortencode_field": ""})
+ html = req.load(self.URL + "login.php",
+ post={"loginUserName": user,
+ "loginUserPassword": data['password'],
+ "loginFormSubmit": "Login",
+ "recaptcha_challenge_field": "",
+ "recaptcha_response_field": "",
+ "recaptcha_shortencode_field": ""},
+ decode=True)
if re.search(self.LOGIN_FAILED_PATTERN, html):
self.wrongPassword()
diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py
index a845e7ba4..4067445af 100644
--- a/module/plugins/accounts/FilerNet.py
+++ b/module/plugins/accounts/FilerNet.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class FilerNet(Account):
__name__ = "FilerNet"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__description__ = """Filer.net account plugin"""
__license__ = "GPLv3"
@@ -44,9 +44,16 @@ class FilerNet(Account):
def login(self, user, data, req):
html = req.load("https://filer.net/login")
+
token = re.search(self.TOKEN_PATTERN, html).group(1)
+
html = req.load("https://filer.net/login_check",
- post={"_username": user, "_password": data['password'],
- "_remember_me": "on", "_csrf_token": token, "_target_path": "https://filer.net/"})
+ post={"_username": user,
+ "_password": data['password'],
+ "_remember_me": "on",
+ "_csrf_token": token,
+ "_target_path": "https://filer.net/"},
+ decode=True)
+
if 'Logout' not in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/FilesMailRu.py b/module/plugins/accounts/FilesMailRu.py
index f91f4d5ba..15926589e 100644
--- a/module/plugins/accounts/FilesMailRu.py
+++ b/module/plugins/accounts/FilesMailRu.py
@@ -6,7 +6,7 @@ from module.plugins.Account import Account
class FilesMailRu(Account):
__name__ = "FilesMailRu"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__description__ = """Filesmail.ru account plugin"""
__license__ = "GPLv3"
@@ -20,9 +20,13 @@ class FilesMailRu(Account):
def login(self, user, data, req):
user, domain = user.split("@")
- html = req.load("http://swa.mail.ru/cgi-bin/auth", None,
- {"Domain": domain, "Login": user, "Password": data['password'],
- "Page": "http://files.mail.ru/"}, cookies=True)
+ html = req.load("http://swa.mail.ru/cgi-bin/auth",
+ post={"Domain": domain,
+ "Login": user,
+ "Password": data['password'],
+ "Page": "http://files.mail.ru/"},
+ cookies=True,
+ decode=True)
- if "Неверное имя пользователя или пароль" in html: # @TODO seems not to work
+ if "Неверное имя пользователя или пароль" in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py
deleted file mode 100644
index ec19f83f5..000000000
--- a/module/plugins/accounts/FourSharedCom.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from module.common.json_layer import json_loads
-from module.plugins.Account import Account
-
-
-class FourSharedCom(Account):
- __name__ = "FourSharedCom"
- __type__ = "account"
- __version__ = "0.03"
-
- __description__ = """FourShared.com account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("zoidberg", "zoidberg@mujmail.cz"),
- ("stickell", "l.stickell@yahoo.it")]
-
-
- def loadAccountInfo(self, user, req):
- # Free mode only for now
- return {"premium": False}
-
-
- def login(self, user, data, req):
- req.cj.setCookie("4shared.com", "4langcookie", "en")
- res = req.load('http://www.4shared.com/web/login',
- post={'login': user,
- 'password': data['password'],
- 'remember': "on",
- '_remember': "on",
- 'returnTo': "http://www.4shared.com/account/home.jsp"})
-
- if 'Please log in to access your 4shared account' in res:
- self.wrongPassword()
diff --git a/module/plugins/accounts/FreakshareCom.py b/module/plugins/accounts/FreakshareCom.py
index 576d835e2..83f4a9a84 100644
--- a/module/plugins/accounts/FreakshareCom.py
+++ b/module/plugins/accounts/FreakshareCom.py
@@ -10,7 +10,7 @@ from module.plugins.Account import Account
class FreakshareCom(Account):
__name__ = "FreakshareCom"
__type__ = "account"
- __version__ = "0.12"
+ __version__ = "0.13"
__description__ = """Freakshare.com account plugin"""
__license__ = "GPLv3"
@@ -44,8 +44,10 @@ class FreakshareCom(Account):
def login(self, user, data, req):
req.load("http://freakshare.com/index.php?language=EN")
- html = req.load("http://freakshare.com/login.html", None,
- {"submit": "Login", "user": user, "pass": data['password']}, cookies=True)
+ html = req.load("http://freakshare.com/login.html",
+ post={"submit": "Login", "user": user, "pass": data['password']},
+ cookies=True,
+ decode=True)
if ">Wrong Username or Password" in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py
index 3b9841630..14b9f1e9a 100644
--- a/module/plugins/accounts/FreeWayMe.py
+++ b/module/plugins/accounts/FreeWayMe.py
@@ -7,7 +7,7 @@ from module.common.json_layer import json_loads
class FreeWayMe(Account):
__name__ = "FreeWayMe"
__type__ = "account"
- __version__ = "0.12"
+ __version__ = "0.13"
__description__ = """FreeWayMe account plugin"""
__license__ = "GPLv3"
@@ -16,8 +16,7 @@ class FreeWayMe(Account):
def loadAccountInfo(self, user, req):
status = self.getAccountStatus(user, req)
- if not status:
- return False
+
self.logDebug(status)
account_info = {"validuntil": -1, "premium": False}
@@ -33,10 +32,6 @@ class FreeWayMe(Account):
return account_info
- def getpw(self, user):
- return self.accounts[user]['password']
-
-
def login(self, user, data, req):
status = self.getAccountStatus(user, req)
@@ -47,9 +42,11 @@ class FreeWayMe(Account):
def getAccountStatus(self, user, req):
answer = req.load("https://www.free-way.me/ajax/jd.php",
- get={"id": 4, "user": user, "pass": self.accounts[user]['password']})
+ get={"id": 4, "user": user, "pass": self.getAccountData(user)['password']})
+
self.logDebug("Login: %s" % answer)
+
if answer == "Invalid login":
self.wrongPassword()
- return False
+
return json_loads(answer)
diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py
index 2da45aac6..66d912958 100644
--- a/module/plugins/accounts/FshareVn.py
+++ b/module/plugins/accounts/FshareVn.py
@@ -1,16 +1,16 @@
# -*- coding: utf-8 -*-
-from time import mktime, strptime
-from pycurl import REFERER
import re
+from time import mktime, strptime
+
from module.plugins.Account import Account
class FshareVn(Account):
__name__ = "FshareVn"
__type__ = "account"
- __version__ = "0.08"
+ __version__ = "0.09"
__description__ = """Fshare.vn account plugin"""
__license__ = "GPLv3"
@@ -46,13 +46,13 @@ class FshareVn(Account):
def login(self, user, data, req):
- req.http.c.setopt(REFERER, "https://www.fshare.vn/login.php")
-
- html = req.load('https://www.fshare.vn/login.php', post={
- "login_password": data['password'],
- "login_useremail": user,
- "url_refe": "http://www.fshare.vn/index.php"
- }, referer=True, decode=True)
+ html = req.load("https://www.fshare.vn/login.php",
+ post={'LoginForm[email]' : user,
+ 'LoginForm[password]' : data['password'],
+ 'LoginForm[rememberMe]': 1,
+ 'yt0' : "Login"},
+ referer=True,
+ decode=True)
if not re.search(r'You input a wrong user name or wrong password
" in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/HundredEightyUploadCom.py b/module/plugins/accounts/HundredEightyUploadCom.py
deleted file mode 100644
index 39f91a8af..000000000
--- a/module/plugins/accounts/HundredEightyUploadCom.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from module.plugins.internal.XFSAccount import XFSAccount
-
-
-class HundredEightyUploadCom(XFSAccount):
- __name__ = "HundredEightyUploadCom"
- __type__ = "account"
- __version__ = "0.02"
-
- __description__ = """180upload.com account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
-
-
- HOSTER_DOMAIN = "180upload.com"
diff --git a/module/plugins/accounts/Keep2shareCc.py b/module/plugins/accounts/Keep2shareCc.py
index fac3cc4a6..e855fb977 100644
--- a/module/plugins/accounts/Keep2shareCc.py
+++ b/module/plugins/accounts/Keep2shareCc.py
@@ -7,12 +7,12 @@ from time import gmtime, mktime, strptime
from module.plugins.Account import Account
-class Keep2shareCc(Account):
- __name__ = "Keep2shareCc"
+class Keep2ShareCc(Account):
+ __name__ = "Keep2ShareCc"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
- __description__ = """Keep2share.cc account plugin"""
+ __description__ = """Keep2Share.cc account plugin"""
__license__ = "GPLv3"
__authors__ = [("aeronaut", "aeronaut@pianoguy.de")]
@@ -35,18 +35,22 @@ class Keep2shareCc(Account):
expiredate = m.group(1).strip()
self.logDebug("Expire date: " + expiredate)
- try:
- validuntil = mktime(strptime(expiredate, "%Y.%m.%d"))
+ if expiredate == "LifeTime":
+ premium = True
+ validuntil = -1
+ else:
+ try:
+ validuntil = mktime(strptime(expiredate, "%Y.%m.%d"))
- except Exception, e:
- self.logError(e)
+ except Exception, e:
+ self.logError(e)
- else:
- if validuntil > mktime(gmtime()):
- premium = True
else:
- premium = False
- validuntil = None
+ if validuntil > mktime(gmtime()):
+ premium = True
+ else:
+ premium = False
+ validuntil = None
m = re.search(self.TRAFFIC_LEFT_PATTERN, html)
if m:
@@ -66,7 +70,8 @@ class Keep2shareCc(Account):
post={'LoginForm[username]' : user,
'LoginForm[password]' : data['password'],
'LoginForm[rememberMe]': 1,
- 'yt0' : ""})
+ 'yt0' : ""},
+ decode=True)
if re.search(self.LOGIN_FAIL_PATTERN, html):
self.wrongPassword()
diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py
index b8244a06d..7f973d2d3 100644
--- a/module/plugins/accounts/LetitbitNet.py
+++ b/module/plugins/accounts/LetitbitNet.py
@@ -7,7 +7,7 @@ from module.plugins.Account import Account
class LetitbitNet(Account):
__name__ = "LetitbitNet"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Letitbit.net account plugin"""
__license__ = "GPLv3"
@@ -16,7 +16,7 @@ class LetitbitNet(Account):
def loadAccountInfo(self, user, req):
## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ##
- # api_key = self.accounts[user]['password']
+ # api_key = self.getAccountData(user)['password']
# json_data = [api_key, ['key/info']]
# api_rep = req.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)})
# self.logDebug("API Key Info: " + api_rep)
diff --git a/module/plugins/accounts/LinksnappyCom.py b/module/plugins/accounts/LinksnappyCom.py
index 19986157b..dff28a055 100644
--- a/module/plugins/accounts/LinksnappyCom.py
+++ b/module/plugins/accounts/LinksnappyCom.py
@@ -9,7 +9,7 @@ from module.common.json_layer import json_loads
class LinksnappyCom(Account):
__name__ = "LinksnappyCom"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__description__ = """Linksnappy.com account plugin"""
__license__ = "GPLv3"
@@ -20,17 +20,22 @@ class LinksnappyCom(Account):
data = self.getAccountData(user)
r = req.load('http://gen.linksnappy.com/lseAPI.php',
get={'act': 'USERDETAILS', 'username': user, 'password': md5(data['password']).hexdigest()})
+
self.logDebug("JSON data: " + r)
+
j = json_loads(r)
if j['error']:
return {"premium": False}
validuntil = j['return']['expire']
+
if validuntil == 'lifetime':
validuntil = -1
+
elif validuntil == 'expired':
return {"premium": False}
+
else:
validuntil = float(validuntil)
@@ -43,8 +48,11 @@ class LinksnappyCom(Account):
def login(self, user, data, req):
- r = req.load('http://gen.linksnappy.com/lseAPI.php',
- get={'act': 'USERDETAILS', 'username': user, 'password': md5(data['password']).hexdigest()})
+ r = req.load("http://gen.linksnappy.com/lseAPI.php",
+ get={'act' : 'USERDETAILS',
+ 'username': user,
+ 'password': md5(data['password']).hexdigest()},
+ decode=True)
if 'Invalid Account Details' in r:
self.wrongPassword()
diff --git a/module/plugins/accounts/MegaRapidCz.py b/module/plugins/accounts/MegaRapidCz.py
index 41da7ac73..b229fe47d 100644
--- a/module/plugins/accounts/MegaRapidCz.py
+++ b/module/plugins/accounts/MegaRapidCz.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class MegaRapidCz(Account):
__name__ = "MegaRapidCz"
__type__ = "account"
- __version__ = "0.34"
+ __version__ = "0.35"
__description__ = """MegaRapid.cz account plugin"""
__license__ = "GPLv3"
@@ -25,19 +25,19 @@ class MegaRapidCz(Account):
def loadAccountInfo(self, user, req):
- html = req.load("http://megarapid.cz/mujucet/", decode=True)
+ htmll = req.load("http://megarapid.cz/mujucet/", decode=True)
- m = re.search(self.LIMITDL_PATTERN, html)
+ m = re.search(self.LIMITDL_PATTERN, htmll)
if m:
data = self.getAccountData(user)
data['options']['limitDL'] = [int(m.group(1))]
- m = re.search(self.VALID_UNTIL_PATTERN, html)
+ m = re.search(self.VALID_UNTIL_PATTERN, htmll)
if m:
validuntil = mktime(strptime(m.group(1), "%d.%m.%Y - %H:%M"))
return {"premium": True, "trafficleft": -1, "validuntil": validuntil}
- m = re.search(self.TRAFFIC_LEFT_PATTERN, html)
+ m = re.search(self.TRAFFIC_LEFT_PATTERN, htmll)
if m:
trafficleft = float(m.group(1)) * (1 << 20)
return {"premium": True, "trafficleft": trafficleft, "validuntil": -1}
@@ -46,12 +46,13 @@ class MegaRapidCz(Account):
def login(self, user, data, req):
- htm = req.load("http://megarapid.cz/prihlaseni/")
- if "Heslo:" in htm:
- start = htm.index('id="inp_hash" name="hash" value="')
- htm = htm[start + 33:]
- hashes = htm[0:32]
- htm = req.load("http://megarapid.cz/prihlaseni/",
+ html = req.load("http://megarapid.cz/prihlaseni/", decode=True)
+
+ if "Heslo:" in html:
+ start = html.index('id="inp_hash" name="hash" value="')
+ html = html[start + 33:]
+ hashes = html[0:32]
+ html = req.load("http://megarapid.cz/prihlaseni/",
post={"hash": hashes,
"login": user,
"pass1": data['password'],
diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py
index 6e0a4358e..127ebadc8 100644
--- a/module/plugins/accounts/MegasharesCom.py
+++ b/module/plugins/accounts/MegasharesCom.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class MegasharesCom(Account):
__name__ = "MegasharesCom"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """Megashares.com account plugin"""
__license__ = "GPLv3"
@@ -37,12 +37,12 @@ class MegasharesCom(Account):
def login(self, user, data, req):
- html = req.load('http://d01.megashares.com/myms_login.php', post={
- "httpref": "",
- "myms_login": "Login",
- "mymslogin_name": user,
- "mymspassword": data['password']
- }, decode=True)
+ html = req.load('http://d01.megashares.com/myms_login.php',
+ post={"httpref" : "",
+ "myms_login" : "Login",
+ "mymslogin_name": user,
+ "mymspassword" : data['password']},
+ decode=True)
if not '%s' % user in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/MultihostersCom.py b/module/plugins/accounts/MultihostersCom.py
index 3f96fdf41..0be64af7f 100644
--- a/module/plugins/accounts/MultihostersCom.py
+++ b/module/plugins/accounts/MultihostersCom.py
@@ -1,50 +1,16 @@
# -*- coding: utf-8 -*-
-from time import mktime, strptime
-from module.plugins.Account import Account
+from module.plugins.accounts.ZeveraCom import ZeveraCom
-class MultihostersCom(Account):
- __name__ = "MultihostersCom"
- __version__ = "0.01"
- __type__ = "account"
- __description__ = """Multihosters.com account plugin"""
- __author_name__ = "tjeh"
- __author_mail__ = "tjeh@gmx.net"
-
- def loadAccountInfo(self, user, req):
- data = self.getAPIData(req)
- if data == "No traffic":
- account_info = {"trafficleft": 0, "validuntil": 0, "premium": False}
- else:
- account_info = {
- "trafficleft": int(data['availabletodaytraffic']) * 1024,
- "validuntil": mktime(strptime(data['endsubscriptiondate'], "%Y/%m/%d %H:%M:%S")),
- "premium": True
- }
- return account_info
- def login(self, user, data, req):
- self.loginname = user
- self.password = data['password']
- if self.getAPIData(req) == "No traffic":
- self.wrongPassword()
+class MultihostersCom(ZeveraCom):
+ __name__ = "MultihostersCom"
+ __type__ = "account"
+ __version__ = "0.02"
- def getAPIData(self, req, just_header=False, **kwargs):
- get_data = {
- 'cmd': 'accountinfo',
- 'login': self.loginname,
- 'pass': self.password
- }
- get_data.update(kwargs)
+ __description__ = """Multihosters.com account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("tjeh", "tjeh@gmx.net")]
- response = req.load("http://www.multihosters.com/jDownloader.ashx", get=get_data,
- decode=True, just_header=just_header)
- self.logDebug(response)
- if ':' in response:
- if not just_header:
- response = response.replace(',', '\n')
- return dict((y.strip().lower(), z.strip()) for (y, z) in
- [x.split(':', 1) for x in response.splitlines() if ':' in x])
- else:
- return response
+ API_URL = "http://api.multihosters.com/jDownloader.ashx"
diff --git a/module/plugins/accounts/MultishareCz.py b/module/plugins/accounts/MultishareCz.py
index 878413007..0ac764ee1 100644
--- a/module/plugins/accounts/MultishareCz.py
+++ b/module/plugins/accounts/MultishareCz.py
@@ -8,7 +8,7 @@ from module.plugins.Account import Account
class MultishareCz(Account):
__name__ = "MultishareCz"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__description__ = """Multishare.cz account plugin"""
__license__ = "GPLv3"
@@ -34,11 +34,11 @@ class MultishareCz(Account):
def login(self, user, data, req):
- html = req.load('http://www.multishare.cz/html/prihlaseni_process.php', post={
- "akce": "Přihlásit",
- "heslo": data['password'],
- "jmeno": user
- }, decode=True)
+ html = req.load('http://www.multishare.cz/html/prihlaseni_process.php',
+ post={"akce" : "Přihlásit",
+ "heslo": data['password'],
+ "jmeno": user},
+ decode=True)
if '' in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py
index 36923470e..4c75b27f0 100644
--- a/module/plugins/accounts/MyfastfileCom.py
+++ b/module/plugins/accounts/MyfastfileCom.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class MyfastfileCom(Account):
__name__ = "MyfastfileCom"
__type__ = "account"
- __version__ = "0.03"
+ __version__ = "0.04"
__description__ = """Myfastfile.com account plugin"""
__license__ = "GPLv3"
@@ -27,8 +27,10 @@ class MyfastfileCom(Account):
def login(self, user, data, req):
# Password to use is the API-Password written in http://myfastfile.com/myaccount
html = req.load("http://myfastfile.com/api.php",
- get={"user": user, "pass": data['password']})
+ get={"user": user, "pass": data['password']})
+
self.logDebug("JSON data: " + html)
+
self.json_data = json_loads(html)
if self.json_data['status'] != 'ok':
self.logError(_('Invalid login. The password to use is the API-Password you find in your "My Account" page'))
diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py
index 15bad6966..1abd7fa84 100755
--- a/module/plugins/accounts/NetloadIn.py
+++ b/module/plugins/accounts/NetloadIn.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class NetloadIn(Account):
__name__ = "NetloadIn"
__type__ = "account"
- __version__ = "0.22"
+ __version__ = "0.23"
__description__ = """Netload.in account plugin"""
__license__ = "GPLv3"
@@ -33,8 +33,12 @@ class NetloadIn(Account):
def login(self, user, data, req):
- html = req.load("http://netload.in/index.php", None,
- {"txtuser": user, "txtpass": data['password'], "txtcheck": "login", "txtlogin": "Login"},
- cookies=True)
+ html = req.load("http://netload.in/index.php",
+ post={"txtuser" : user,
+ "txtpass" : data['password'],
+ "txtcheck": "login",
+ "txtlogin": "Login"},
+ cookies=True,
+ decode=True)
if "password or it might be invalid!" in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/NowVideoSx.py b/module/plugins/accounts/NowVideoSx.py
index e2dcaba12..f44ae3865 100644
--- a/module/plugins/accounts/NowVideoSx.py
+++ b/module/plugins/accounts/NowVideoSx.py
@@ -10,7 +10,7 @@ from module.plugins.Account import Account
class NowVideoSx(Account):
__name__ = "NowVideoSx"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """NowVideo.at account plugin"""
__license__ = "GPLv3"
@@ -50,7 +50,8 @@ class NowVideoSx(Account):
def login(self, user, data, req):
html = req.load("http://www.nowvideo.sx/login.php",
- post={'user': user, 'pass': data['password']})
+ post={'user': user, 'pass': data['password']},
+ decode=True)
- if ">Invalid login details" is html:
+ if re.search(r'>Log In<', html):
self.wrongPassword()
diff --git a/module/plugins/accounts/OboomCom.py b/module/plugins/accounts/OboomCom.py
index 4d90e1b25..0acacbb2a 100644
--- a/module/plugins/accounts/OboomCom.py
+++ b/module/plugins/accounts/OboomCom.py
@@ -11,7 +11,7 @@ from module.plugins.Account import Account
class OboomCom(Account):
__name__ = "OboomCom"
__type__ = "account"
- __version__ = "0.22"
+ __version__ = "0.23"
__description__ = """Oboom.com account plugin"""
__license__ = "GPLv3"
@@ -20,12 +20,15 @@ class OboomCom(Account):
def loadAccountData(self, user, req):
passwd = self.getAccountData(user)['password']
- salt = passwd[::-1]
+ salt = passwd[::-1]
pbkdf2 = PBKDF2(passwd, salt, 1000).hexread(16)
+
result = json_loads(req.load("https://www.oboom.com/1/login", get={"auth": user, "pass": pbkdf2}))
+
if not result[0] == 200:
self.logWarning(_("Failed to log in: %s") % result[1])
self.wrongPassword()
+
return result[1]
diff --git a/module/plugins/accounts/OneFichierCom.py b/module/plugins/accounts/OneFichierCom.py
deleted file mode 100644
index 2f1c914c1..000000000
--- a/module/plugins/accounts/OneFichierCom.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from time import strptime, mktime
-
-from pycurl import REFERER
-
-from module.plugins.Account import Account
-
-
-class OneFichierCom(Account):
- __name__ = "OneFichierCom"
- __type__ = "account"
- __version__ = "0.11"
-
- __description__ = """1fichier.com account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("Elrick69", "elrick69[AT]rocketmail[DOT]com"),
- ("Walter Purcaro", "vuolter@gmail.com")]
-
-
- VALID_UNTIL_PATTERN = r'Your Premium Status will end the (\d+/\d+/\d+)'
-
-
- def loadAccountInfo(self, user, req):
- validuntil = None
- trafficleft = -1
- premium = None
-
- html = req.load("https://1fichier.com/console/abo.pl")
-
- m = re.search(self.VALID_UNTIL_PATTERN, html)
- if m:
- expiredate = m.group(1)
- self.logDebug("Expire date: " + expiredate)
-
- try:
- validuntil = mktime(strptime(expiredate, "%d/%m/%Y"))
- except Exception, e:
- self.logError(e)
- else:
- premium = True
-
- return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium or False}
-
-
- def login(self, user, data, req):
- req.http.c.setopt(REFERER, "https://1fichier.com/login.pl?lg=en")
-
- html = req.load("https://1fichier.com/login.pl?lg=en",
- post={'mail': user, 'pass': data['password'], 'It': "on", 'purge': "off", 'valider': "Send"})
-
- if '>Invalid email address' in html or '>Invalid password' in html:
- self.wrongPassword()
diff --git a/module/plugins/accounts/PremiumTo.py b/module/plugins/accounts/PremiumTo.py
index 2c486a1dd..ea6fbbf65 100644
--- a/module/plugins/accounts/PremiumTo.py
+++ b/module/plugins/accounts/PremiumTo.py
@@ -6,7 +6,7 @@ from module.plugins.Account import Account
class PremiumTo(Account):
__name__ = "PremiumTo"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__description__ = """Premium.to account plugin"""
__license__ = "GPLv3"
@@ -30,7 +30,8 @@ class PremiumTo(Account):
self.username = user
self.password = data['password']
authcode = req.load("http://premium.to/api/getauthcode.php",
- get={'username': user, 'password': self.password}).strip()
+ get={'username': user, 'password': self.password},
+ decode=True)
if "wrong username" in authcode:
self.wrongPassword()
diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py
index c1abde309..7d061ec2d 100644
--- a/module/plugins/accounts/PremiumizeMe.py
+++ b/module/plugins/accounts/PremiumizeMe.py
@@ -8,7 +8,7 @@ from module.common.json_layer import json_loads
class PremiumizeMe(Account):
__name__ = "PremiumizeMe"
__type__ = "account"
- __version__ = "0.12"
+ __version__ = "0.13"
__description__ = """Premiumize.me account plugin"""
__license__ = "GPLv3"
@@ -45,5 +45,5 @@ class PremiumizeMe(Account):
answer = req.load("https://api.premiumize.me/pm-api/v1.php",
get={'method' : "accountstatus",
'params[login]': user,
- 'params[pass]' : self.accounts[user]['password']})
+ 'params[pass]' : self.getAccountData(user)['password']})
return json_loads(answer)
diff --git a/module/plugins/accounts/PutdriveCom.py b/module/plugins/accounts/PutdriveCom.py
new file mode 100644
index 000000000..7e7410d4e
--- /dev/null
+++ b/module/plugins/accounts/PutdriveCom.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.accounts.ZeveraCom import ZeveraCom
+
+
+class PutdriveCom(ZeveraCom):
+ __name__ = "PutdriveCom"
+ __type__ = "account"
+ __version__ = "0.01"
+
+ __description__ = """Putdrive.com account plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ API_URL = "http://api.putdrive.com/jDownloader.ashx"
diff --git a/module/plugins/accounts/QuickshareCz.py b/module/plugins/accounts/QuickshareCz.py
index 18af5f736..16141d63e 100644
--- a/module/plugins/accounts/QuickshareCz.py
+++ b/module/plugins/accounts/QuickshareCz.py
@@ -8,7 +8,7 @@ from module.plugins.Account import Account
class QuickshareCz(Account):
__name__ = "QuickshareCz"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """Quickshare.cz account plugin"""
__license__ = "GPLv3"
@@ -33,11 +33,11 @@ class QuickshareCz(Account):
def login(self, user, data, req):
- html = req.load('http://www.quickshare.cz/html/prihlaseni_process.php', post={
- "akce": u'Přihlásit',
- "heslo": data['password'],
- "jmeno": user
- }, decode=True)
+ html = req.load('http://www.quickshare.cz/html/prihlaseni_process.php',
+ post={"akce": u'Přihlásit',
+ "heslo": data['password'],
+ "jmeno": user},
+ decode=True)
if u'>Takový uživatel neexistuje.<' in html or u'>Špatné heslo.<' in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py
index 813453c03..829e54a46 100644
--- a/module/plugins/accounts/RPNetBiz.py
+++ b/module/plugins/accounts/RPNetBiz.py
@@ -7,7 +7,7 @@ from module.common.json_layer import json_loads
class RPNetBiz(Account):
__name__ = "RPNetBiz"
__type__ = "account"
- __version__ = "0.11"
+ __version__ = "0.12"
__description__ = """RPNet.biz account plugin"""
__license__ = "GPLv3"
@@ -44,7 +44,7 @@ class RPNetBiz(Account):
def getAccountStatus(self, user, req):
# Using the rpnet API, check if valid premium account
res = req.load("https://premium.rpnet.biz/client_api.php",
- get={"username": user, "password": self.accounts[user]['password'],
+ get={"username": user, "password": self.getAccountData(user)['password'],
"action": "showAccountInformation"})
self.logDebug("JSON data: %s" % res)
diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py
index 2899d5a68..b29d94228 100644
--- a/module/plugins/accounts/RapidgatorNet.py
+++ b/module/plugins/accounts/RapidgatorNet.py
@@ -7,7 +7,7 @@ from module.common.json_layer import json_loads
class RapidgatorNet(Account):
__name__ = "RapidgatorNet"
__type__ = "account"
- __version__ = "0.05"
+ __version__ = "0.06"
__description__ = """Rapidgator.net account plugin"""
__license__ = "GPLv3"
@@ -44,7 +44,9 @@ class RapidgatorNet(Account):
def login(self, user, data, req):
try:
json = req.load('%s/login' % self.API_URL, post={"username": user, "password": data['password']})
+
self.logDebug("API:LOGIN", json)
+
json = json_loads(json)
if json['response_status'] == 200:
@@ -52,6 +54,7 @@ class RapidgatorNet(Account):
return
else:
self.logError(json['response_details'])
+
except Exception, e:
self.logError(e)
diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py
index 48b17df5f..41d8a0975 100644
--- a/module/plugins/accounts/RealdebridCom.py
+++ b/module/plugins/accounts/RealdebridCom.py
@@ -8,7 +8,7 @@ from module.plugins.Account import Account
class RealdebridCom(Account):
__name__ = "RealdebridCom"
__type__ = "account"
- __version__ = "0.44"
+ __version__ = "0.45"
__description__ = """Real-Debrid.com account plugin"""
__license__ = "GPLv3"
@@ -28,9 +28,13 @@ class RealdebridCom(Account):
def login(self, user, data, req):
self.pin_code = False
- html = req.load("https://real-debrid.com/ajax/login.php", get={"user": user, "pass": data['password']})
+ html = req.load("https://real-debrid.com/ajax/login.php",
+ get={"user": user, "pass": data['password']},
+ decode=True)
+
if "Your login informations are incorrect" in html:
self.wrongPassword()
+
elif "PIN Code required" in html:
self.logWarning(_("PIN code required. Please login to https://real-debrid.com using the PIN or disable the double authentication in your control panel on https://real-debrid.com"))
self.pin_code = True
diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py
index 00a45dedd..660bef07e 100644
--- a/module/plugins/accounts/RehostTo.py
+++ b/module/plugins/accounts/RehostTo.py
@@ -6,7 +6,7 @@ from module.plugins.Account import Account
class RehostTo(Account):
__name__ = "RehostTo"
__type__ = "account"
- __version__ = "0.11"
+ __version__ = "0.12"
__description__ = """Rehost.to account plugin"""
__license__ = "GPLv3"
@@ -17,8 +17,10 @@ class RehostTo(Account):
data = self.getAccountData(user)
html = req.load("http://rehost.to/api.php",
get={'cmd': "login", 'user': user, 'pass': data['password']})
+
data = [x.split("=") for x in html.split(",")]
- ses = data[0][1]
+
+ ses = data[0][1]
long_ses = data[1][1]
html = req.load("http://rehost.to/api.php",
@@ -39,7 +41,8 @@ class RehostTo(Account):
def login(self, user, data, req):
html = req.load("http://rehost.to/api.php",
- get={'cmd': "login", 'user': user, 'pass': data['password']})
+ get={'cmd': "login", 'user': user, 'pass': data['password']},
+ decode=True)
if "Login failed." in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py
index 57fe52385..3ee6e04af 100644
--- a/module/plugins/accounts/ShareonlineBiz.py
+++ b/module/plugins/accounts/ShareonlineBiz.py
@@ -8,7 +8,7 @@ from module.plugins.Account import Account
class ShareonlineBiz(Account):
__name__ = "ShareonlineBiz"
__type__ = "account"
- __version__ = "0.29"
+ __version__ = "0.30"
__description__ = """Share-online.biz account plugin"""
__license__ = "GPLv3"
@@ -17,7 +17,10 @@ class ShareonlineBiz(Account):
def api_response(self, user, req):
return req.load("http://api.share-online.biz/cgi-bin",
- get={'q': "userdetails", 'aux': "traffic", "username": user, "password": self.accounts[user]['password']})
+ get={'q' : "userdetails",
+ 'aux' : "traffic",
+ 'username': user,
+ 'password': self.getAccountData(user)['password']})
def loadAccountInfo(self, user, req):
diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py
index 465757457..accb3aba8 100644
--- a/module/plugins/accounts/SimplyPremiumCom.py
+++ b/module/plugins/accounts/SimplyPremiumCom.py
@@ -7,7 +7,7 @@ from module.plugins.Account import Account
class SimplyPremiumCom(Account):
__name__ = "SimplyPremiumCom"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """Simply-Premium.com account plugin"""
__license__ = "GPLv3"
@@ -42,7 +42,7 @@ class SimplyPremiumCom(Account):
else:
post_data = {"login_name": user, "login_pass": data['password']}
- html = req.load("http://www.simply-premium.com/login.php", post=post_data)
+ html = req.load("http://www.simply-premium.com/login.php", post=post_data, decode=True)
if 'logout' not in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py
index 406534364..29be2f73d 100644
--- a/module/plugins/accounts/SimplydebridCom.py
+++ b/module/plugins/accounts/SimplydebridCom.py
@@ -8,7 +8,7 @@ from module.plugins.Account import Account
class SimplydebridCom(Account):
__name__ = "SimplydebridCom"
__type__ = "account"
- __version__ = "0.10"
+ __version__ = "0.11"
__description__ = """Simply-Debrid.com account plugin"""
__license__ = "GPLv3"
@@ -27,8 +27,9 @@ class SimplydebridCom(Account):
def login(self, user, data, req):
self.loginname = user
- self.password = data['password']
- get_data = {'login': 1, 'u': self.loginname, 'p': self.password}
+ self.password = data['password']
+ get_data = {'login': 1, 'u': self.loginname, 'p': self.password}
+
res = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True)
if res != "02: loggin success":
self.wrongPassword()
diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py
index 8157806c8..d192f20cf 100644
--- a/module/plugins/accounts/SmoozedCom.py
+++ b/module/plugins/accounts/SmoozedCom.py
@@ -1,43 +1,48 @@
# -*- coding: utf-8 -*-
-from module.plugins.Account import Account
-
-from module.common.json_layer import json_loads
-
-from time import time
-
import hashlib
+
from beaker.crypto.pbkdf2 import PBKDF2
+from time import time
+from module.common.json_layer import json_loads
+from module.plugins.Account import Account
class SmoozedCom(Account):
__name__ = "SmoozedCom"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Smoozed.com account plugin"""
__license__ = "GPLv3"
- __authors__ = []
+ __authors__ = [("", "")]
def loadAccountInfo(self, user, req):
# Get user data from premiumize.me
status = self.getAccountStatus(user, req)
- self.logDebug(status)
- # Parse account info
- account_info = {"validuntil": float(status["data"]["user"]["user_premium"]),
- "trafficleft": max(0, status["data"]["traffic"][1] - status["data"]["traffic"][0]),
- "session_key": status["data"]["session_key"],
- "hoster": [hoster["name"] for hoster in status["data"]["hoster"]]}
+ self.logDebug(status)
- if account_info["validuntil"] < time():
- account_info['premium'] = False
+ if status['state'] != 'ok':
+ info = {'validuntil' : None,
+ 'trafficleft': None,
+ 'premium' : False}
else:
- account_info['premium'] = True
+ # Parse account info
+ info = {'validuntil' : float(status["data"]["user"]["user_premium"]),
+ 'trafficleft': max(0, status["data"]["traffic"][1] - status["data"]["traffic"][0]),
+ 'session_key': status["data"]["session_key"],
+ 'hosters' : [hoster["name"] for hoster in status["data"]["hoster"]]}
+
+ if info['validuntil'] < time():
+ info['premium'] = False
+ else:
+ info['premium'] = True
+
+ return info
- return account_info
def login(self, user, data, req):
# Get user data from premiumize.me
@@ -47,9 +52,11 @@ class SmoozedCom(Account):
if status['state'] != 'ok':
self.wrongPassword()
+
def getAccountStatus(self, user, req):
- salt = hashlib.sha256(self.accounts[user]['password']).hexdigest()
- encrypted = PBKDF2(self.accounts[user]['password'], salt, iterations=1000).hexread(32)
- answer = req.load('http://www2.smoozed.com/api/login?auth=%s&password=%s' % (
- user, encrypted))
- return json_loads(answer)
+ password = self.getAccountData(user)['password']
+ salt = hashlib.sha256(password).hexdigest()
+ encrypted = PBKDF2(password, salt, iterations=1000).hexread(32)
+
+ return json_loads(req.load("http://www2.smoozed.com/api/login",
+ get={'auth': user, 'password': encrypted}))
diff --git a/module/plugins/accounts/StahnuTo.py b/module/plugins/accounts/StahnuTo.py
index 2b08c67cd..882dbd2c3 100644
--- a/module/plugins/accounts/StahnuTo.py
+++ b/module/plugins/accounts/StahnuTo.py
@@ -8,7 +8,7 @@ from module.plugins.Account import Account
class StahnuTo(Account):
__name__ = "StahnuTo"
__type__ = "account"
- __version__ = "0.04"
+ __version__ = "0.05"
__description__ = """StahnuTo account plugin"""
__license__ = "GPLv3"
@@ -25,10 +25,11 @@ class StahnuTo(Account):
def login(self, user, data, req):
- html = req.load("http://www.stahnu.to/login.php", post={
- "username": user,
- "password": data['password'],
- "submit": "Login"})
+ html = req.load("http://www.stahnu.to/login.php",
+ post={"username": user,
+ "password": data['password'],
+ "submit": "Login"},
+ decode=True)
if not '
' in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/TurbobitNet.py b/module/plugins/accounts/TurbobitNet.py
index f87d234a7..a857649eb 100644
--- a/module/plugins/accounts/TurbobitNet.py
+++ b/module/plugins/accounts/TurbobitNet.py
@@ -9,7 +9,7 @@ from module.plugins.Account import Account
class TurbobitNet(Account):
__name__ = "TurbobitNet"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """TurbobitNet account plugin"""
__license__ = "GPLv3"
@@ -33,10 +33,11 @@ class TurbobitNet(Account):
def login(self, user, data, req):
req.cj.setCookie("turbobit.net", "user_lang", "en")
- html = req.load("http://turbobit.net/user/login", post={
- "user[login]": user,
- "user[pass]": data['password'],
- "user[submit]": "Login"})
+ html = req.load("http://turbobit.net/user/login",
+ post={"user[login]": user,
+ "user[pass]": data['password'],
+ "user[submit]": "Login"},
+ decode=True)
if not '