Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

password

Status
Not open for further replies.

pasword

Vendor
Jun 16, 2005
1
IR
What's the script to display password input as asterisks?
 
What's the environment? web page? unix command line? Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
you can substitute:

$input = param('input');
$input =~s/$input/******/; There is no Knowledge that is not power.
Age: 16
E-mail: projectnet01@yahoo.com
School: Coral Springs High (Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
ok...

don't know how to display '*'s but you can turn off the display whilst the user is entering the password.

#!/path/to/perl

system('stty -echo')
print "Enter Password: ";
$pass = <>;
system('stty -echo')

Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Hi Mike,
tried your way but i doesn't seem to work anymore.

Instead i got this errormsg:

Bad command or file name
Enter Password: aaa
Bad command or file name

Please advice
 
Hi there,

Bad Command or filename, that looks like a DOS (Windows) error message to me... Aren't you using the UNIX command line? Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Ooopps! Sorry for the question. Got it right this time. Thanks Mike.
 
Mike shouldn't your second system call be &quot;system('stty echo')&quot;? Otherwise you're still turning echo off. Don't have my RH box handy to test it.

Barbie.
--
Leader of Birmingham Perl Mongers
 
errrmm yeah :~/ Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top