diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-08 23:31:33 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-08 23:31:33 +0100 |
commit | 36e60a23497ae05736c24fed2f4ce936fb61f744 (patch) | |
tree | d743ace8e6c032cccb524cbb8474263d9d7bd4e1 /module/plugins/accounts/FilerNet.py | |
parent | "New Year" Update: internal plugins (diff) | |
download | pyload-36e60a23497ae05736c24fed2f4ce936fb61f744.tar.xz |
"New Year" Update: account plugins
Diffstat (limited to 'module/plugins/accounts/FilerNet.py')
-rw-r--r-- | module/plugins/accounts/FilerNet.py | 13 |
1 files changed, 10 insertions, 3 deletions
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() |