When user specify a password in MySQL cli, aka -pXXXXXX
, the password parameter is replaced to -p******
in argv array.
So when someone check the process list with ps
, they can't see the password.
How can I do the same in Python? This doesn't work obviously
for arg in sys.argv[1:]:
arg = ""