ota_update: read password invisibly

This commit is contained in:
Thomas Kolb 2019-12-02 20:40:47 +01:00
parent 832b30f485
commit 48089dd526
1 changed files with 4 additions and 1 deletions

View File

@ -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)) )