From f53d57b902b71708f05a3125872ec5d34ebe65b9 Mon Sep 17 00:00:00 2001 From: Armin Date: Thu, 9 Apr 2015 20:11:11 +0200 Subject: fix: OboomCom and SmoozedCom with beaker >= v1.7.x fix: run plugins this fix makes the plugin attribute "__name" obsolet --- pyload/plugin/account/OboomCom.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'pyload/plugin/account/OboomCom.py') 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 -- cgit v1.2.3