Sha256: 2d619e87b36f1b75b3013a65e6611f2036b51c6b6ab8221868ccd534e9c0a393

Contents?: true

Size: 541 Bytes

Versions: 54

Compression:

Stored size: 541 Bytes

Contents

#!/usr/bin/env ruby

# overwrite.rb
#
#  Created by Jeremy Hinegardner on 2007-01-24
#  Copyright 2007 Jeremy Hinegardner.  All rights reserved

require 'rubygems'
require 'highline/import'

prompt = "here is your password:"
ask(
  "#{prompt} <%= color('mypassword', RED, BOLD) %> (Press Any Key to blank) "
) do |q|
    q.overwrite = true
    q.echo      = false  # overwrite works best when echo is false.
    q.character = true   # if this is set to :getc then overwrite does not work
end
say("<%= color('Look! blanked out!', GREEN) %>")

Version data entries

54 entries across 53 versions & 10 rubygems

Version Path
brakeman-4.3.1 bundle/ruby/2.5.0/gems/highline-1.7.10/examples/overwrite.rb
brakeman-4.3.0 bundle/ruby/2.5.0/gems/highline-1.7.10/examples/overwrite.rb
brakeman-4.2.1 bundle/ruby/2.5.0/gems/highline-1.7.10/examples/overwrite.rb
brakeman-4.2.0 bundle/ruby/2.3.0/gems/highline-1.7.10/examples/overwrite.rb
brakeman-4.1.1 bundle/ruby/2.3.0/gems/highline-1.7.10/examples/overwrite.rb
brakeman-4.1.0 bundle/ruby/2.3.0/gems/highline-1.7.10/examples/overwrite.rb
highline-1.7.10 examples/overwrite.rb
brakeman-4.0.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-4.0.1.pre1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-4.0.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.7.2 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.7.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.7.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.6.2 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.6.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.6.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.5.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.4.1 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.4.0 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb
brakeman-3.3.5 bundle/ruby/2.3.0/gems/highline-1.7.8/examples/overwrite.rb