Procházet zdrojové kódy

Fix to finish feature/commands merge (#28).

tags/v0.1^2
Ben Kurtovic před 14 roky
rodič
revize
e9be04de37
2 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. +3
    -0
      earwigbot/config.py
  2. +1
    -0
      setup.py

+ 3
- 0
earwigbot/config.py Zobrazit soubor

@@ -27,6 +27,7 @@ import logging.handlers
from os import mkdir, path from os import mkdir, path


from Crypto.Cipher import Blowfish from Crypto.Cipher import Blowfish
import bcrypt
import yaml import yaml


from earwigbot.exceptions import NoConfigError from earwigbot.exceptions import NoConfigError
@@ -263,6 +264,8 @@ class BotConfig(object):
if not self._decryption_cipher: if not self._decryption_cipher:
key = getpass("Enter key to decrypt bot passwords: ") key = getpass("Enter key to decrypt bot passwords: ")
self._decryption_cipher = Blowfish.new(sha256(key).digest()) self._decryption_cipher = Blowfish.new(sha256(key).digest())
signature = self.metadata["signature"]
assert bcrypt.hashpw(key, signature) == signature
for node, nodes in self._decryptable_nodes: for node, nodes in self._decryptable_nodes:
self._decrypt(node, nodes) self._decrypt(node, nodes)




+ 1
- 0
setup.py Zobrazit soubor

@@ -37,6 +37,7 @@ setup(
"mwparserfromhell >= 0.1", # Wikicode parsing "mwparserfromhell >= 0.1", # Wikicode parsing
"oursql >= 0.9.3", # Talking with MediaWiki databases "oursql >= 0.9.3", # Talking with MediaWiki databases
"oauth2 >= 1.5.211", # Talking with Yahoo BOSS Search "oauth2 >= 1.5.211", # Talking with Yahoo BOSS Search
"py-bcrypt >= 0.2", # Password hashing in config
"pycrypto >= 2.5", # Storing bot passwords and keys "pycrypto >= 2.5", # Storing bot passwords and keys
"pytz >= 2012c", # Timezone handling "pytz >= 2012c", # Timezone handling
], ],


Načítá se…
Zrušit
Uložit