i'm writing a python application that uses a command line utility (propietary so it can't be modified) to do part of its work. The problem is that I have to pass the password as a command line argument to the tool which would easily be seen by any user doing 'ps ax'. How can I send the password to the command line tool safely from within python (or a shell script)?
Write another python script that will accept password from command prompt using getpass.getpass() and store it in a variable. Then call the command from the script with that variable having password as parameter.
sending password to command line tools