From f9ba0c901f95070a70bf0f741d49086781cbc812 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Sat, 3 Feb 2018 16:30:03 +0100 Subject: [PATCH] [enh] examples: display input fields without sensitive information. Typos. --- examples/save_private_keys.py | 2 +- examples/save_revoke_document.py | 2 +- examples/send_certification.py | 12 ++++++------ examples/send_membership.py | 4 ++-- examples/send_transaction.py | 12 ++++++------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/save_private_keys.py b/examples/save_private_keys.py index 75f099b8..b27a6d32 100644 --- a/examples/save_private_keys.py +++ b/examples/save_private_keys.py @@ -34,7 +34,7 @@ signer = SigningKey(salt, password)\ # check public key if signer.pubkey != pubkey: - print("Bad credentials !") + print("Bad credentials!") exit(1) # save private keys in a file (json format) diff --git a/examples/save_revoke_document.py b/examples/save_revoke_document.py index a8e309ba..50b53f9f 100644 --- a/examples/save_revoke_document.py +++ b/examples/save_revoke_document.py @@ -108,7 +108,7 @@ async def main(): # check public key if signer.pubkey != pubkey: - print("Bad credentials !") + print("Bad credentials!") exit(0) # connection handler from BMA endpoint diff --git a/examples/send_certification.py b/examples/send_certification.py index 59a15cb6..f0db5b78 100644 --- a/examples/send_certification.py +++ b/examples/send_certification.py @@ -96,13 +96,13 @@ async def main(): salt = getpass.getpass("Enter your passphrase (salt): ") # prompt hidden user entry - password = getpass.getpass("Enter your password : ") + password = getpass.getpass("Enter your password: ") - # prompt hidden user entry - pubkey_from = getpass.getpass("Enter your pubkey : ") + # prompt entry + pubkey_from = input("Enter your pubkey: ") - # prompt hidden user entry - pubkey_to = getpass.getpass("Enter certified pubkey : ") + # prompt entry + pubkey_to = input("Enter certified pubkey: ") # capture current block to get version and currency and blockstamp current_block = await bma.blockchain.current(connection) @@ -119,7 +119,7 @@ async def main(): if response.status == 200: print(await response.text()) else: - print("Error while publishing certification : {0}".format(await response.text())) + print("Error while publishing certification: {0}".format(await response.text())) response.close() with AIOHTTP_SESSION: diff --git a/examples/send_membership.py b/examples/send_membership.py index a2ee6813..dc75f30d 100644 --- a/examples/send_membership.py +++ b/examples/send_membership.py @@ -107,8 +107,8 @@ async def main(): # prompt hidden user entry password = getpass.getpass("Enter your password: ") - # prompt hidden user entry - UID = getpass.getpass("Enter your UID: ") + # prompt entry + UID = input("Enter your UID: ") # create our signed identity document identity = get_identity_document(current_block, UID, salt, password) diff --git a/examples/send_transaction.py b/examples/send_transaction.py index 778527d9..18da6de6 100644 --- a/examples/send_transaction.py +++ b/examples/send_transaction.py @@ -100,13 +100,13 @@ async def main(): salt = getpass.getpass("Enter your passphrase (salt): ") # prompt hidden user entry - password = getpass.getpass("Enter your password : ") + password = getpass.getpass("Enter your password: ") - # prompt hidden user entry - pubkey_from = getpass.getpass("Enter your pubkey : ") + # prompt entry + pubkey_from = input("Enter your pubkey: ") - # prompt hidden user entry - pubkey_to = getpass.getpass("Enter recipient pubkey : ") + # prompt entry + pubkey_to = input("Enter recipient pubkey: ") # capture current block to get version and currency and blockstamp current_block = await bma.blockchain.current(connection) @@ -136,7 +136,7 @@ async def main(): if response.status == 200: print(await response.text()) else: - print("Error while publishing transaction : {0}".format(await response.text())) + print("Error while publishing transaction: {0}".format(await response.text())) response.close() -- GitLab