Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Answer: How do I make password prompts not echo back the user?

by isotope (Deacon)
on Mar 02, 2001 at 17:08 UTC ( [id://61836]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: How do I make password prompts not echo back the user?
in thread How do I make password prompts not echo back the user?

You might want to try something more like:
use Term::ReadKey; ReadMode('noecho'); # don't echo print "Type your password:"; chomp(my $password = <STDIN>); ReadMode(0); # back to normal
...so you only print the password prompt when echo has already been disabled. This makes your program more compatible with things like Expect, which may not wait long enough after the prompt for the echo to be disabled before sending the password.

--isotope
http://www.skylab.org/~isotope/
  • Comment on Re: Answer: How do I make password prompts not echo back the user?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://61836]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.