Password input getpass
This commit is contained in:
committed by
GitHub
parent
16a284f74c
commit
f307ae290c
11
start.py
11
start.py
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse, sys, platform, os, multiprocessing, subprocess
|
||||
import argparse, sys, platform, os, multiprocessing, subprocess, getpass
|
||||
|
||||
pref = "\033["
|
||||
reset = f"{pref}0m"
|
||||
@@ -92,8 +92,15 @@ if start_operation:
|
||||
if args.psw_no_interactive:
|
||||
psw_set = args.psw_no_interactive
|
||||
elif not args.startup_psw:
|
||||
while True:
|
||||
puts("Insert the password for firegex: ", end="" , color=colors.yellow, is_bold=True)
|
||||
psw_set = input()
|
||||
psw_set = getpass.getpass("")
|
||||
puts("Confirm the password: ", end="" , color=colors.yellow, is_bold=True)
|
||||
check = getpass.getpass("")
|
||||
if check != psw_set:
|
||||
puts("Passwords don't match!", end="" , color=colors.yellow, is_bold=True)
|
||||
else:
|
||||
break
|
||||
|
||||
composefile = "firegex-compose.yml"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user