# Passport in \*\*\*\*\* form

**URL:** <https://www.ruby-forum.com/t/passport-in-form/126226>\
**Category:** Ruby\
**Created:** [January 16, 2008, 2:57pm UTC](https://www.ruby-forum.com/t/passport-in-form/126226 "2008-01-16T14:57:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasadm29](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@prasadm29](https://www.ruby-forum.com/u/prasadm29)\
**Post date:** [January 16, 2008, 2:57pm UTC](https://www.ruby-forum.com/t/passport-in-form/126226/1 "2008-01-16T14:57:37Z")

</div>

Hi ,  
I am currently writing a program for logging in using telnet. Just  
wanted the password to be kept secret so want to implement it using  
\*\*\*\*\*\*\*\*\*\* when the user types in the password.

Thanks,  
Prasad.

---

<div class="post-metadata">

**Author:** ![prasadm29](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@prasadm29](https://www.ruby-forum.com/u/prasadm29)\
**Post date:** [January 17, 2008, 11:01pm UTC](https://www.ruby-forum.com/t/passport-in-form/126226/2 "2008-01-17T23:01:34Z")

</div>

Hi,

Am Mittwoch, 16. Jan 2008, 22:57:32 +0900 schrieb Prasad P.:

> I am currently writing a program for logging in using telnet. Just  
> wanted the password to be kept secret so want to implement it using  
> \*\*\*\*\*\*\*\*\*\* when the user types in the password.

[http://www.bertram-scharpf.de/tmp/password.rb](http://www.bertram-scharpf.de/tmp/password.rb)

Bertram

---

<div class="post-metadata">

**Author:** ![prasadm29](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@prasadm29](https://www.ruby-forum.com/u/prasadm29)\
**Post date:** [January 18, 2008, 8:04am UTC](https://www.ruby-forum.com/t/passport-in-form/126226/3 "2008-01-18T08:04:13Z")

</div>

Hey,  
But aint there any other altenative, As I am a begiiner in ruby just  
wanted to know if we could take in the input through “gets” method in a  
safe way???

Thankx,  
Prasad

---

<div class="post-metadata">

**Author:** ![prasadm29](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@prasadm29](https://www.ruby-forum.com/u/prasadm29)\
**Post date:** [January 18, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/passport-in-form/126226/4 "2008-01-18T15:08:51Z")

</div>

Hi,

Am Freitag, 18. Jan 2008, 16:04:09 +0900 schrieb Prasad P.:

> But aint there any other altenative, As I am a begiiner in ruby just  
> wanted to know if we could take in the input through “gets” method in a  
> safe way???

There is also [http://www.caliban.org/ruby/ruby-password.shtml](http://www.caliban.org/ruby/ruby-password.shtml).  
I forgot why I did not like it and wrote my own.

Bertram

---

<div class="post-metadata">

**Author:** ![prasadm29](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/cc9497/32.png) [@prasadm29](https://www.ruby-forum.com/u/prasadm29)\
**Post date:** [January 18, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/passport-in-form/126226/5 "2008-01-18T16:52:19Z")

</div>

After installing the highline gem you can:

require ‘highline’  
password = HighLine.new.ask(‘password:’{|q| q.echo  
= ‘\*’ }

Hope that helps

^ manveru
