Skip to content

Instantly share code, notes, and snippets.

@KINGSABRI
Created April 14, 2012 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KINGSABRI/2387738 to your computer and use it in GitHub Desktop.
Save KINGSABRI/2387738 to your computer and use it in GitHub Desktop.
Password Shadow
#!/bin/ruby
# PGP-Cryptor to PGP files
#
# ☉★
#
require 'highline/import'
require 'colorize'
mark_Red = "[+]".red
mark_Green = "[+]".green
mark_yellow = "[+]".yellow
def get_password
pass_new = ask('New Password: ') {|q| q.echo = '★'.yellow}
pass_verify = ask('Verify Password: ') {|q| q.echo = '★'.yellow}
unless pass_new == pass_verify
puts "Password is not matching!.".red
else
puts "Password OK.".green
return pass_new # return the password
end
end
puts a = get_password #
# No Colorizing
# def get_password
# pass_new = ask('New Password: ') {|q| q.echo = '★'}
# pass_verify = ask('Verify Password: ') {|q| q.echo = '★'}
#
# if pass_new == pass_verify
# puts "Password OK."
# return pass_new # return the password
# else
# puts "Password is not matching."
# end
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment