From 049298dbdbff33918454b03a3b072f418d47af97 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 6 Jun 2015 05:33:38 +0200 Subject: Use SSL when login account --- module/plugins/accounts/RehostTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index 04e71c9ad..e8173d75b 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -19,7 +19,7 @@ class RehostTo(Account): validuntil = -1 session = "" - html = req.load("http://rehost.to/api.php", + html = req.load("https://rehost.to/api.php", get={'cmd' : "login", 'user': user, 'pass': self.getAccountData(user)['password']}) try: @@ -45,7 +45,7 @@ class RehostTo(Account): def login(self, user, data, req): - html = req.load("http://rehost.to/api.php", + html = req.load("https://rehost.to/api.php", get={'cmd': "login", 'user': user, 'pass': data['password']}, decode=True) -- cgit v1.2.3 From 0e1ef9bc01579328e17e79416fa3c1c7b77adcc8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 06:08:01 +0200 Subject: Update everything --- module/plugins/accounts/RehostTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index e8173d75b..728b2e84e 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class RehostTo(Account): __name__ = "RehostTo" __type__ = "account" - __version__ = "0.16" + __version__ = "0.17" __description__ = """Rehost.to account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/accounts/RehostTo.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index 728b2e84e..5f0c1253e 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -19,14 +19,14 @@ class RehostTo(Account): validuntil = -1 session = "" - html = req.load("https://rehost.to/api.php", + html = self.load("https://rehost.to/api.php", get={'cmd' : "login", 'user': user, 'pass': self.getAccountData(user)['password']}) try: session = html.split(",")[1].split("=")[1] - html = req.load("http://rehost.to/api.php", - get={'cmd': "get_premium_credits", 'long_ses': session}) + html = self.load("http://rehost.to/api.php", + get={'cmd': "get_premium_credits", 'long_ses': session}, req=req) if html.strip() == "0,0" or "ERROR" in html: self.logDebug(html) @@ -45,9 +45,8 @@ class RehostTo(Account): def login(self, user, data, req): - html = req.load("https://rehost.to/api.php", - get={'cmd': "login", 'user': user, 'pass': data['password']}, - decode=True) + html = self.load("https://rehost.to/api.php", + get={'cmd': "login", 'user': user, 'pass': data['password']}, req=req) if "ERROR" in html: self.logDebug(html) -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/accounts/RehostTo.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index 5f0c1253e..43c0cb029 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -6,14 +6,14 @@ from module.plugins.internal.Account import Account class RehostTo(Account): __name__ = "RehostTo" __type__ = "account" - __version__ = "0.17" + __version__ = "0.18" __description__ = """Rehost.to account plugin""" __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): premium = False trafficleft = None validuntil = -1 @@ -21,7 +21,7 @@ class RehostTo(Account): html = self.load("https://rehost.to/api.php", get={'cmd' : "login", 'user': user, - 'pass': self.getAccountData(user)['password']}) + 'pass': self.get_account_data(user)['password']}) try: session = html.split(",")[1].split("=")[1] @@ -29,12 +29,12 @@ class RehostTo(Account): get={'cmd': "get_premium_credits", 'long_ses': session}, req=req) if html.strip() == "0,0" or "ERROR" in html: - self.logDebug(html) + self.log_debug(html) else: traffic, valid = html.split(",") premium = True - trafficleft = self.parseTraffic(traffic + "MB") + trafficleft = self.parse_traffic(traffic + "MB") validuntil = float(valid) finally: @@ -49,5 +49,5 @@ class RehostTo(Account): get={'cmd': "login", 'user': user, 'pass': data['password']}, req=req) if "ERROR" in html: - self.logDebug(html) - self.wrongPassword() + self.log_debug(html) + self.wrong_password() -- cgit v1.2.3 From d2e2b127651a5a44b56337eb6d9ca246c97a208a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 03:03:26 +0200 Subject: Spare fixes and code cosmetics --- module/plugins/accounts/RehostTo.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index 43c0cb029..deaf55340 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -26,7 +26,9 @@ class RehostTo(Account): session = html.split(",")[1].split("=")[1] html = self.load("http://rehost.to/api.php", - get={'cmd': "get_premium_credits", 'long_ses': session}, req=req) + get={'cmd' : "get_premium_credits", + 'long_ses': session}, + req=req) if html.strip() == "0,0" or "ERROR" in html: self.log_debug(html) @@ -46,7 +48,10 @@ class RehostTo(Account): def login(self, user, data, req): html = self.load("https://rehost.to/api.php", - get={'cmd': "login", 'user': user, 'pass': data['password']}, req=req) + get={'cmd': "login", + 'user': user, + 'pass': data['password']}, + req=req) if "ERROR" in html: self.log_debug(html) -- cgit v1.2.3 From 1f5a55ae2133a782bdcca334ecbcdbde50dbcf99 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 15:29:48 +0200 Subject: No more need to use the req argument when call load method --- module/plugins/accounts/RehostTo.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index deaf55340..fb7380d9c 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -27,8 +27,7 @@ class RehostTo(Account): html = self.load("http://rehost.to/api.php", get={'cmd' : "get_premium_credits", - 'long_ses': session}, - req=req) + 'long_ses': session}) if html.strip() == "0,0" or "ERROR" in html: self.log_debug(html) @@ -50,8 +49,7 @@ class RehostTo(Account): html = self.load("https://rehost.to/api.php", get={'cmd': "login", 'user': user, - 'pass': data['password']}, - req=req) + 'pass': data['password']}) if "ERROR" in html: self.log_debug(html) -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/accounts/RehostTo.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index fb7380d9c..a5984eda9 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -7,6 +7,7 @@ class RehostTo(Account): __name__ = "RehostTo" __type__ = "account" __version__ = "0.18" + __status__ = "stable" __description__ = """Rehost.to account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/accounts/RehostTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index a5984eda9..80e8af6a1 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -7,7 +7,7 @@ class RehostTo(Account): __name__ = "RehostTo" __type__ = "account" __version__ = "0.18" - __status__ = "stable" + __status__ = "testing" __description__ = """Rehost.to account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 8f17f875f6e28f73ddb10da59c6464bd04922222 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 04:59:27 +0200 Subject: Account rewritten --- module/plugins/accounts/RehostTo.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index 80e8af6a1..1bfd79088 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -14,7 +14,7 @@ class RehostTo(Account): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def load_account_info(self, user, req): + def parse_info(self, user, password, data, req): premium = False trafficleft = None validuntil = -1 @@ -22,7 +22,7 @@ class RehostTo(Account): html = self.load("https://rehost.to/api.php", get={'cmd' : "login", 'user': user, - 'pass': self.get_account_data(user)['password']}) + 'pass': self.get_data(user)['password']}) try: session = html.split(",")[1].split("=")[1] @@ -46,12 +46,12 @@ class RehostTo(Account): 'session' : session} - def login(self, user, data, req): + def login(self, user, password, data, req): html = self.load("https://rehost.to/api.php", get={'cmd': "login", 'user': user, - 'pass': data['password']}) + 'pass': password}) if "ERROR" in html: self.log_debug(html) - self.wrong_password() + self.fail() -- cgit v1.2.3 From a95c217627a1cb651b24e69f20640df40797aff9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 09:34:18 +0200 Subject: Account rewritten (2) --- module/plugins/accounts/RehostTo.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/RehostTo.py') diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py index 1bfd79088..36e5e33eb 100644 --- a/module/plugins/accounts/RehostTo.py +++ b/module/plugins/accounts/RehostTo.py @@ -21,8 +21,9 @@ class RehostTo(Account): session = "" html = self.load("https://rehost.to/api.php", - get={'cmd' : "login", 'user': user, - 'pass': self.get_data(user)['password']}) + get={'cmd' : "login", + 'user': user, + 'pass': password}) try: session = html.split(",")[1].split("=")[1] @@ -54,4 +55,4 @@ class RehostTo(Account): if "ERROR" in html: self.log_debug(html) - self.fail() + self.login_fail() -- cgit v1.2.3