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 = ""
sys.argv = []
. Alsodel sys.argv[1]
(or whatever the index of the argument should be), which might just delete the one item? – Chisolm