Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Hiding passwords in scripts

by pelagic (Priest)
on Sep 29, 2004 at 13:29 UTC ( [id://394964]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Hiding passwords in scripts
in thread Hiding passwords in scripts

You could use a very simple config file (call it eg .secret.config to make it hidden) such as:
first secret second public
and parse it with ConfigReader::Simple like:
use strict; use ConfigReader::Simple; my $config = ConfigReader::Simple->new(".secret.config"); print $config->get( "first" ), "\n"; print $config->get( "second" ), "\n";
Update
Of course hidden is not read protected. It's just that you don't see your settings in the code. To get more security you might want to protect the config file with a mode that only the executor can read the content ... but then how can the developers test the thing?

pelagic

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://394964]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found