diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-10 14:50:24 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-10 14:50:24 +0200 |
commit | c12cb8adcc0eef5ffc11762d85cae9f5ff8c2921 (patch) | |
tree | 3d2b5a37c18414714f68e721b52ca393dd7e75a9 /pyload/plugin/account/OboomCom.py | |
parent | [README] Update (2) (diff) | |
parent | added: configdata of deleted or outdated plugins are deletedfrom config (diff) | |
download | pyload-c12cb8adcc0eef5ffc11762d85cae9f5ff8c2921.tar.xz |
Merge pull request #2 from ardi69/0.4.10
makes the plugins runable
Diffstat (limited to 'pyload/plugin/account/OboomCom.py')
-rw-r--r-- | pyload/plugin/account/OboomCom.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pyload/plugin/account/OboomCom.py b/pyload/plugin/account/OboomCom.py index 7b73c38fa..0712cbc37 100644 --- a/pyload/plugin/account/OboomCom.py +++ b/pyload/plugin/account/OboomCom.py @@ -2,7 +2,19 @@ import time -from beaker.crypto.pbkdf2 import PBKDF2 +try: + from beaker.crypto.pbkdf2 import PBKDF2 +except: + from beaker.crypto.pbkdf2 import pbkdf2 + from binascii import b2a_hex + class PBKDF2(object): + def __init__(self, passphrase, salt, iterations=1000): + self.passphrase = passphrase + self.salt = salt + self.iterations = iterations + + def hexread(self, octets): + return b2a_hex(pbkdf2(self.passphrase, self.salt, self.iterations, octets)) from pyload.utils import json_loads from pyload.plugin.Account import Account |