read the password from a file and restrict the permissions on that file.
or
read pass word interactively from user
or
include password in the code - a hardcoding
All methods have some weakness
first and last store password in clear text so there are chances of password being compromised. Second one cannot run without user interaction.
Yet another option is to keep the password encrypted in a file.
Main Topics
Browse All Topics





by: evilrixPosted on 2008-07-09 at 01:20:49ID: 21961461
>> please provide me a solution how to hide the password when executing a statement using "system" function.
I don't believe there is anyway you can prevent the. The solution is not to use the system function but to do this in code.
What is it you are trying to achieve here? Lets see if we can find a C way of doing it.