From 460c7d45d12cb2145cde8e74644fbd78429d75ad Mon Sep 17 00:00:00 2001 From: Ben D Date: Tue, 1 Feb 2022 02:26:38 -0800 Subject: [PATCH] Added getpass --- e911_helper.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/e911_helper.py b/e911_helper.py index 24620e0..23ba4d5 100644 --- a/e911_helper.py +++ b/e911_helper.py @@ -10,6 +10,7 @@ import requests import json import sys import os +from getpass import getpass try: from loguru import logger @@ -1218,9 +1219,9 @@ def prompt_credentials(config): print(f"{Colors.LIGHT_GREEN}DO NOT SHARE YOUR CREDENTIALS WITH ANYONE.{Colors.END}") config["username"] = input("Enter your api.switchvoxuc.com username: ") - config["password"] = input("Enter your api.switchvoxuc.com password: ") + config["password"] = getpass("Enter your api.switchvoxuc.com password: ") config["provider_username"] = input("Enter your api.nwsip.com username: ") - config["provider_password"] = input("Enter your api.nwsip.com password: ") + config["provider_password"] = getpass("Enter your api.nwsip.com password: ") print(f"{Colors.LIGHT_GREEN}Configure additoinal tenant credentials.{Colors.END}") tenant = input("Enter your tenant name or enter for None: ") or None @@ -1230,13 +1231,13 @@ def prompt_credentials(config): config["tenant"][tenant]["username"] = input( f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.switchvoxuc.com username: " ) - config["tenant"][tenant]["password"] = input( + config["tenant"][tenant]["password"] = getpass( f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.switchvoxuc.com password: " ) config["tenant"][tenant]["provider_username"] = input( f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.nwsip.com username: " ) - config["tenant"][tenant]["provider_password"] = input( + config["tenant"][tenant]["provider_password"] = getpass( f"Enter your {Colors.LIGHT_CYAN}{tenant}{Colors.END} api.nwsip.com password: " )