http://www.perlmonks.org?node_id=990616


in reply to Embeded passwords

Why not write a Perl script that has as its soul purpose is to supply your CGI scripts the password(s) they need. You would need to invoke this script from the command-line so it can prompt you for the password. This script then forks off into the background (becomes a daemon) and listens for connections and responds with the password. That way the password only exist in your brain and the daemon process. Of course someone could still modify your CGI scripts to print out the password it received from the daemon, but it is more secure that hardcoding the password in your CGI's. Also there are plenty of nodes that discuss similar problems, like Hiding passwords in scripts.