mirror of https://github.com/cowrie/cowrie.git
should probably call config() before using it
git-svn-id: https://kippo.googlecode.com/svn/trunk@84 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
parent
b4ef820816
commit
8c4eae2f57
|
@ -321,6 +321,7 @@ class HoneypotPasswordChecker:
|
|||
return defer.fail(error.UnauthorizedLogin())
|
||||
|
||||
def getRSAKeys():
|
||||
cfg = config()
|
||||
if not (os.path.exists('public.key') and os.path.exists('private.key')):
|
||||
# generate a RSA keypair
|
||||
print "Generating RSA keypair..."
|
||||
|
@ -334,7 +335,6 @@ def getRSAKeys():
|
|||
file(cfg.get('honeypot', 'private_key'), 'w+b').write(privateKeyString)
|
||||
print "done."
|
||||
else:
|
||||
cfg = config()
|
||||
publicKeyString = file(cfg.get('honeypot', 'public_key')).read()
|
||||
privateKeyString = file(cfg.get('honeypot', 'private_key')).read()
|
||||
return publicKeyString, privateKeyString
|
||||
|
|
Loading…
Reference in New Issue