Friday, September 4, 2009

Commandline password prompt in ruby


require 'rubygems'
require 'highline/import'

def get_password(prompt="Enter Password")
ask(prompt) {|q| q.echo = false}
end

password = get_password()

No comments:

Blog Archive