[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sending password in the command line



Benjamin Smith said:
> > #!/usr/bin/perl
> > print('enter pass: ');
> > $tmp = <>;
> > system('myprogram enable $user $tmp $ip');
> 
> I think the first bit of code would work but why not use pipe opens in
> perl? ie.
> 
> open(PASS, "|myprogram enable $user $ip);
> write PASS "PASSWORD";
> 

the best would be to add this lines to myprogram if its written in perl.

David Flatz



Reply to: