diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-25 18:22:27 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-08-25 18:22:27 +0200 |
commit | 29f9dc8fb3396b03d732ebcbeb1cc8f00fe13897 (patch) | |
tree | f2a910cbea747a7b0c0a50d6c66691e54f5ef47f /core/module/plugins/accounts | |
parent | merged gui (diff) | |
download | pyload-29f9dc8fb3396b03d732ebcbeb1cc8f00fe13897.tar.xz |
new dirs
Diffstat (limited to 'core/module/plugins/accounts')
-rw-r--r-- | core/module/plugins/accounts/DepositfilesCom.py | 50 | ||||
-rw-r--r-- | core/module/plugins/accounts/FileserveCom.py | 59 | ||||
-rw-r--r-- | core/module/plugins/accounts/HotfileCom.py | 88 | ||||
-rw-r--r-- | core/module/plugins/accounts/NetloadIn.py | 33 | ||||
-rw-r--r-- | core/module/plugins/accounts/RapidshareCom.py | 78 | ||||
-rw-r--r-- | core/module/plugins/accounts/ShareonlineBiz.py | 50 | ||||
-rw-r--r-- | core/module/plugins/accounts/UploadedTo.py | 55 | ||||
-rw-r--r-- | core/module/plugins/accounts/__init__.py | 0 |
8 files changed, 0 insertions, 413 deletions
diff --git a/core/module/plugins/accounts/DepositfilesCom.py b/core/module/plugins/accounts/DepositfilesCom.py deleted file mode 100644 index 044f647be..000000000 --- a/core/module/plugins/accounts/DepositfilesCom.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: mkaay -""" - -from module.plugins.Account import Account -import re -from time import strptime, mktime -import hashlib - -class DepositfilesCom(Account): - __name__ = "DepositfilesCom" - __version__ = "0.1" - __type__ = "account" - __description__ = """depositfiles.com account plugin""" - __author_name__ = ("mkaay") - __author_mail__ = ("mkaay@mkaay.de") - - def getAccountInfo(self, user): - req = self.core.requestFactory.getRequest(self.__name__, user) - - src = req.load("http://depositfiles.com/de/gold/") - validuntil = re.search("noch den Gold-Zugriff: <b>(.*?)</b></div>", src).group(1) - - validuntil = int(mktime(strptime(validuntil, "%Y-%m-%d %H:%M:%S"))) - - out = Account.getAccountInfo(self, user) - - tmp = {"validuntil":validuntil, "trafficleft":-1} - out.update(tmp) - return out - - def login(self, user, data): - req = self.core.requestFactory.getRequest(self.__name__, user) - req.load("http://depositfiles.com/de/gold/payment.php") - req.load("http://depositfiles.com/de/login.php", get={"return": "/de/gold/payment.php"}, post={"login": user, "password": data["password"]}) diff --git a/core/module/plugins/accounts/FileserveCom.py b/core/module/plugins/accounts/FileserveCom.py deleted file mode 100644 index a9b222a6a..000000000 --- a/core/module/plugins/accounts/FileserveCom.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: mkaay -""" - -from module.plugins.Account import Account -import re -from time import strptime, mktime -import hashlib - -class FileserveCom(Account): - __name__ = "FileserveCom" - __version__ = "0.1" - __type__ = "account" - __description__ = """fileserve.com account plugin""" - __author_name__ = ("mkaay") - __author_mail__ = ("mkaay@mkaay.de") - - def getAccountInfo(self, user): - try: - req = self.core.requestFactory.getRequest(self.__name__, user) - - src = req.load("http://fileserve.com/dashboard.php", cookies=True) - - out = Account.getAccountInfo(self, user) - - m = re.search(r"<td><h4>Premium Until</h4></th> <td><h5>(.*?) E(.)T</h5></td>", src) - if m: - zone = -5 if m.group(2) == "S" else -4 - validuntil = int(mktime(strptime(m.group(1), "%d %B %Y"))) + 24*3600 + (zone*3600) - tmp = {"validuntil":validuntil, "trafficleft":-1} - else: - tmp = {"trafficleft":-1} - out.update(tmp) - return out - except: - return Account.getAccountInfo(user) - - def login(self, user, data): - req = self.core.requestFactory.getRequest(self.__name__, user) - req.load("http://fileserve.com/login.php", - post={"loginUserName": user, "loginUserPassword": data["password"], - "autoLogin": "on", "loginFormSubmit": "Login"}, cookies=True) - req.load("http://fileserve.com/dashboard.php", cookies=True) - diff --git a/core/module/plugins/accounts/HotfileCom.py b/core/module/plugins/accounts/HotfileCom.py deleted file mode 100644 index e6e8ba517..000000000 --- a/core/module/plugins/accounts/HotfileCom.py +++ /dev/null @@ -1,88 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: mkaay -""" - -from module.plugins.Account import Account -import re -from time import strptime, mktime -import hashlib - -class HotfileCom(Account): - __name__ = "HotfileCom" - __version__ = "0.1" - __type__ = "account" - __description__ = """hotfile.com account plugin""" - __author_name__ = ("mkaay") - __author_mail__ = ("mkaay@mkaay.de") - - def getAccountInfo(self, user): - try: - req = self.core.requestFactory.getRequest(self.__name__, user) - - 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 - - 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*3600) - out = Account.getAccountInfo(self, user) - tmp = {"validuntil":validuntil, "trafficleft":-1} - out.update(tmp) - return out - except: - return Account.getAccountInfo(user) - - def apiCall(self, method, post={}, user=None): - if user: - data = None - for account in self.accounts.items(): - if account[0] == user: - data = account[1] - else: - user, data = self.accounts.items()[0] - - req = self.core.requestFactory.getRequest(self.__name__, 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}) - return req.load("http://api.hotfile.com/", post=post) - - def login(self, user, data): - req = self.core.requestFactory.getRequest(self.__name__, user) - cj = self.core.requestFactory.getCookieJar(self.__name__, user) - cj.setCookie("hotfile.com", "lang", "en") - req.load("http://hotfile.com/", cookies=True) - req.load("http://hotfile.com/login.php", post={"returnto": "/", "user": user, "pass": data["password"]}, cookies=True) diff --git a/core/module/plugins/accounts/NetloadIn.py b/core/module/plugins/accounts/NetloadIn.py deleted file mode 100644 index 5743c7835..000000000 --- a/core/module/plugins/accounts/NetloadIn.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: mkaay -""" - -from module.plugins.Account import Account - -class NetloadIn(Account): - __name__ = "NetloadIn" - __version__ = "0.1" - __type__ = "account" - __description__ = """netload.in account plugin""" - __author_name__ = ("RaNaN") - __author_mail__ = ("RaNaN@pyload.org") - - def login(self, user, data): - req = self.core.requestFactory.getRequest(self.__name__, user) - req.load("http://netload.in/index.php", None, { "txtuser" : user, "txtpass" : data['password'], "txtcheck" : "login", "txtlogin" : ""}, cookies=True) - diff --git a/core/module/plugins/accounts/RapidshareCom.py b/core/module/plugins/accounts/RapidshareCom.py deleted file mode 100644 index c9766cd57..000000000 --- a/core/module/plugins/accounts/RapidshareCom.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: mkaay -""" - -from module.plugins.Account import Account - -class RapidshareCom(Account): - __name__ = "RapidshareCom" - __version__ = "0.1" - __type__ = "account" - __description__ = """Rapidshare.com account plugin""" - __author_name__ = ("mkaay") - __author_mail__ = ("mkaay@mkaay.de") - - def getAccountInfo(self, user): - try: - data = None - for account in self.accounts.items(): - if account[0] == user: - data = account[1] - if not data: - raise Exception - req = self.core.requestFactory.getRequest(self.__name__, user) - api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" - api_param_prem = {"sub": "getaccountdetails_v1", "type": "prem", "login": user, "password": data["password"], "withcookie": 1} - src = req.load(api_url_base, cookies=False, get=api_param_prem) - if src.startswith("ERROR"): - raise Exception - fields = src.split("\n") - info = {} - for t in fields: - if not t.strip(): - continue - k, v = t.split("=") - info[k] = v - - out = Account.getAccountInfo(self, user) - restkb = int(info["tskb"]) - maxtraffic = int(info["rapids"])/14 * (5*1024*1024) + restkb - tmp = {"validuntil":int(info["billeduntil"]), "trafficleft":maxtraffic if int(info["autorefill"]) else restkb, "maxtraffic":maxtraffic} - out.update(tmp) - return out - except: - return Account.getAccountInfo(self, user) - - def login(self, user, data): - req = self.core.requestFactory.getRequest(self.__name__, user) - api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" - api_param_prem = {"sub": "getaccountdetails_v1", "type": "prem", "login": user, "password": data["password"], "withcookie": 1} - src = req.load(api_url_base, cookies=False, get=api_param_prem) - if src.startswith("ERROR"): - return - fields = src.split("\n") - info = {} - for t in fields: - if not t.strip(): - continue - k, v = t.split("=") - info[k] = v - cj = self.core.requestFactory.getCookieJar(self.__name__, user) - cj.setCookie("rapidshare.com", "enc", info["cookie"]) - - diff --git a/core/module/plugins/accounts/ShareonlineBiz.py b/core/module/plugins/accounts/ShareonlineBiz.py deleted file mode 100644 index 611fa759d..000000000 --- a/core/module/plugins/accounts/ShareonlineBiz.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: mkaay -""" - -from module.plugins.Account import Account -from time import strptime, mktime -import re - -class ShareonlineBiz(Account): - __name__ = "ShareonlineBiz" - __version__ = "0.2" - __type__ = "account" - __description__ = """share-online.biz account plugin""" - __author_name__ = ("mkaay") - __author_mail__ = ("mkaay@mkaay.de") - - def getAccountInfo(self, user): - req = self.core.requestFactory.getRequest(self.__name__, user) - src = req.load("https://www.share-online.biz/alpha/user/profile") - - validuntil = re.search(r"Account gültig bis:.*?<span class='.*?'>(.*?)</span>", src).group(1) - validuntil = int(mktime(strptime(validuntil, "%m/%d/%Y, %I:%M:%S %p"))) - - out = Account.getAccountInfo(self, user) - tmp = {"validuntil":validuntil, "trafficleft":-1} - out.update(tmp) - return out - - def login(self, user, data): - req = self.core.requestFactory.getRequest(self.__name__, user) - post_vars = {"user": user, - "pass": data["password"], - "l_rememberme":"1"} - req.lastURL = "http://www.share-online.biz/alpha/" - req.load("https://www.share-online.biz/alpha/user/login", cookies=True, post=post_vars) diff --git a/core/module/plugins/accounts/UploadedTo.py b/core/module/plugins/accounts/UploadedTo.py deleted file mode 100644 index 1311ee809..000000000 --- a/core/module/plugins/accounts/UploadedTo.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- - -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: mkaay -""" - -from module.plugins.Account import Account -import re -from time import strptime, mktime - -class UploadedTo(Account): - __name__ = "UploadedTo" - __version__ = "0.1" - __type__ = "account" - __description__ = """ul.to account plugin""" - __author_name__ = ("mkaay") - __author_mail__ = ("mkaay@mkaay.de") - - def getAccountInfo(self, user): - try: - data = None - for account in self.accounts.items(): - if account[0] == user: - data = account[1] - if not data: - raise Exception - req = self.core.requestFactory.getRequest(self.__name__, user) - html = req.load("http://uploaded.to/", cookies=True) - raw_traffic = re.search(r"Traffic left: </span><span class=.*?>(.*?)</span>", html).group(1) - raw_valid = re.search(r"Valid until: </span> <span class=.*?>(.*?)</span>", html).group(1) - traffic = int(self.parseTraffic(raw_traffic)) - validuntil = int(mktime(strptime(raw_valid.strip(), "%d-%m-%Y %H:%M"))) - out = Account.getAccountInfo(self, user) - tmp = {"validuntil":validuntil, "trafficleft":traffic, "maxtraffic":100*1024*1024} - out.update(tmp) - return out - except: - return Account.getAccountInfo(self, user) - - def login(self, user, data): - req = self.core.requestFactory.getRequest(self.__name__, user) - req.load("http://uploaded.to/login", None, { "email" : user, "password" : data["password"]}, cookies=True) diff --git a/core/module/plugins/accounts/__init__.py b/core/module/plugins/accounts/__init__.py deleted file mode 100644 index e69de29bb..000000000 --- a/core/module/plugins/accounts/__init__.py +++ /dev/null |