From ac7b827c36a1248c63fa496ee6bc234e089fe860 Mon Sep 17 00:00:00 2001 From: KF7EEL Date: Thu, 3 Jun 2021 17:19:44 -0700 Subject: [PATCH] finalize burn list --- hblink.py | 6 ++++-- user_managment/app.py | 5 +++-- user_managment/config-SAMPLE.py | 5 +++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hblink.py b/hblink.py index 95c7a71..9b43c1e 100755 --- a/hblink.py +++ b/hblink.py @@ -275,9 +275,10 @@ class HBSYSTEM(DatagramProtocol): burn_id = ast.literal_eval(os.popen('cat ' + self._CONFIG['USER_MANAGER']['BURN_FILE']).read()) peer_id_trimmed = int(str(int_id(peer_id))[:7]) try: - #print(self.ums_response) + print(self.ums_response) if self.ums_response['mode'] == 'legacy': _calc_hash = bhex(sha256(_salt_str+self._config['PASSPHRASE']).hexdigest()) + calc_passphrase = self._config['PASSPHRASE'] if self.ums_response['mode'] == 'override': _calc_hash = bhex(sha256(_salt_str+str.encode(self.ums_response['value'])).hexdigest()) if self.ums_response['mode'] == 'normal': @@ -310,7 +311,8 @@ class HBSYSTEM(DatagramProtocol): if self._CONFIG['USER_MANAGER']['SHORTEN_PASSPHRASE'] == False: pass _calc_hash = bhex(sha256(_salt_str+calc_passphrase).hexdigest()) - print((calc_passphrase)) + print(calc_passphrase) + # print(_calc_hash) return _calc_hash diff --git a/user_managment/app.py b/user_managment/app.py index 1c0e39b..9bbbda4 100644 --- a/user_managment/app.py +++ b/user_managment/app.py @@ -825,8 +825,8 @@ def create_app(): Custom -'' -0 +0 - default
1+ new calculation) +'' 'passphrase' @@ -880,6 +880,7 @@ def create_app(): passphrase = gen_passphrase(dmr_id) elif authorized_peer(dmr_id)[1] == '': passphrase = legacy_passphrase + print(passphrase) elif authorized_peer(dmr_id)[1] != '' or authorized_peer(dmr_id)[1] != 0: passphrase = authorized_peer(dmr_id)[1] #try: diff --git a/user_managment/config-SAMPLE.py b/user_managment/config-SAMPLE.py index 76538c8..c96f1e9 100644 --- a/user_managment/config-SAMPLE.py +++ b/user_managment/config-SAMPLE.py @@ -24,6 +24,11 @@ append_int = 1 shared_secrets = ['test'] + +burn_int = 5 + +legacy_passphrase = 'passw0rd' + # Email settings MAIL_SERVER = 'smtp.gmail.com' MAIL_PORT = 465