in reply to Mention password in the script -encrypted form
Or if you need deeper security, encrypt it with any a of various modules, then base64encode it into a string. In the script, send the encoded password to a sub, and return the decoded. That way, unless they are hacker-savvy enough to put in a print statement, no one should actually see the password in plain decoded text.#!/usr/bin/perl use warnings; use strict; #by fokat of perlmonks my $string = 'justanotherperlhacker'; print "$string\n"; my $obscure = pack("u",$string); print "$obscure\n"; my $unobscure = unpack(chr(ord("a") + 19 + print ""),$obscure); print "$unobscure\n";
|
|---|