Do you know how to improve security on perl?
Do you know how to encrypt the ID and PW in perl
Specious guy can get ID and PW in perl script.

I have been making the script to get DB healthcheck info about 20 DB servers 
everyday.

I use DBI module.

But, I have to enter id and pw in perl script.(example below)
It make security weak.


Thank you in advance


use strict;
use DBI;

##################### DBI configuration ########################
my $hostip   = "127.0.0.1";
my $username = "hr";    <-   how to encrypt id
my $password = "hr";  <-  how to encrypt pw
my $sid      = "orcl";
my $dsn = "DBI:Oracle:host=$hostip;sid=$sid";
my %attr = ( RaiseError => 1, AutoCommit => 0 );

# howto 1
my $dbh = DBI->connect ($dsn, $username, $password, \%attr) || die "Database 
connection not mode : $DBI::errstr";
# howto 2
#my $dbh = DBI->connect ("DBI:Oracle:host=$hostip;sid=$sid", $username, 
$password, \%attr);

my $que = "select * from jobs";
my $i1;

my $cursor = $dbh->selectall_arrayref($que);
for (@$cursor) {
    print "@{$_} \n";
}

$dbh->disconnect;

##################### DBI configuration ########################



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to