Re: sending password in the command line
Pedro Zorzenon Neto said:
> Thanks for you sugestion David,
>
> As it is a Perl script that will call the program, I'll do in the Perl
> code something like this:
>
> $tmp=`umask 177; tempfile`;
> fopen (PASS,">$tmp");
> print PASS $password;
> fclose PASS;
> `cat $tmp | myprogram enable $user $ip; rm -f $tmp`;
>
> will this be safe now?
why don't you just do
#!/usr/bin/perl
print('enter pass: ');
$tmp = <>;
system('myprogram enable $user $tmp $ip');
david flatz
Reply to: