From 48089dd5261ecfa8fd6f2b6f51c3a7e5a08784f1 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Mon, 2 Dec 2019 20:40:47 +0100 Subject: [PATCH] ota_update: read password invisibly --- scripts/ota_update.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/ota_update.py b/scripts/ota_update.py index 4a255ac..35438bb 100755 --- a/scripts/ota_update.py +++ b/scripts/ota_update.py @@ -5,6 +5,9 @@ import socket import struct import hashlib import os +import time + +from getpass import getpass def readMessage(sock): data = sock.recv(4) @@ -28,7 +31,7 @@ with open("../data/etc/auth", "r") as authFile: _, host, port, filename = sys.argv # read and store the password from the user -pwd = input("Enter password: ") +pwd = getpass() s = socket.create_connection( (host, int(port)) )