I need to write a console application in C # that enters a username and password as input parameters.
Example: mytool.exe --username foo --password bar
It is easy, but, of course, the password will be displayed on the screen as soon as the user types it. Security issue.
Is there any way to handle this in a safer way? The following, however, is not an option:
C:\>mytool.exe
Please enter username:
Please enter password:
The application must support the call without user interaction, for example. regularly administered cronjob.
source
share