ota_update: read password invisibly
This commit is contained in:
parent
832b30f485
commit
48089dd526
|
@ -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)) )
|
||||
|
||||
|
|
Loading…
Reference in a new issue