From bdd9ab1d1707633a8f23b4c5328f6f23ef3dc852 Mon Sep 17 00:00:00 2001 From: quadrismegistus Date: Sun, 13 Sep 2020 06:39:38 +0100 Subject: [PATCH] updates --- komrade/backend/people.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/komrade/backend/people.py b/komrade/backend/people.py index 52a5ece..a06f07c 100644 --- a/komrade/backend/people.py +++ b/komrade/backend/people.py @@ -51,6 +51,7 @@ class Persona(Caller): if name and not self.name: self.name=name if not name and self.name: name=self.name if not name and not self.name: name='' + ## 1) Have name? if SHOW_STATUS and show_intro: @@ -67,17 +68,13 @@ class Persona(Caller): if SHOW_STATUS and not passphrase: passphrase = self.cli.status_keymaker_part2(name,passphrase,pubkey,privkey,hasher,self) else: - print(passphrase,'????') if not passphrase: passphrase = DEBUG_DEFAULT_PASSPHRASE - # while not passphrase: - # passphrase=getpass('Enter a memorable password to encrypt your private key with: ') - print('ok') + while not passphrase: + passphrase=getpass('Enter a memorable password to encrypt your private key with: ') self.passphrase=passphrase - print(passphrase,self.passphrase,'!') ## 4) Get hashed password passhash = hasher(passphrase) # self.log(f'''Keymaker has created a symmetric encryption cell using the disguised password:\n\n\t(2A) [Symmetric Encryption Key]\n\t({make_key_discreet_str(passhash)})''') - print(passhash,'!') ## 5) Encrypt private key privkey_decr = KomradeSymmetricKeyWithPassphrase(passphrase) privkey_encr = privkey_decr.encrypt(privkey.data) @@ -142,9 +139,9 @@ def test_register(): import random num = random.choice(list(range(0,1000))) botname=f'marx{str(num).zfill(3)}' - marxbot = Persona(botname,passphrase=DEBUG_DEFAULT_PASSPHRASE) + marxbot = Persona(botname) # marxbot=Persona() - marxbot.register() + marxbot.register(passphrase='spectre') if __name__=='__main__': test_register()