View Full Version : Fairly simple question
kiwipenguin
09-12-2002, 05:37 AM
I work in a school, and teachers being teachers one has decided she hates Microsoft and insisted she have this "new-fangled Linux" on her new PC. I've installed Mandrake Linux 8.2 for her, but she can't seem to come to grips with the smbmount command. In order to get her off my back I've written a (very) simple Perl script that does it for her. I just need one final piece of the puzzle.
Can I have Perl hide what is typed into the password field?
I work in a school, and teachers being teachers one has decided she hates Microsoft and insisted she have this "new-fangled Linux" on her new PC.
Wow; that's dangerous! :)
Okay; this is from the perl cookbook:
You'll have to get the CPAN module Term::ReadKey; then simply:
use Term::ReadKey;
ReadMode('noecho');
$password = ReadLine(0);
ReadMode('normal');
There's also some sample code for checking the password, too, if you want it.
Btw; if you do a fair deal of perl coding; the Perl Cookbook is invaluable.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.