Sha256: 8ff19993b90ecf7cc52097b138b1fb5b2e27d4ea91f9323fb4dbbb087c690e38

Contents?: true

Size: 390 Bytes

Versions: 181

Compression:

Stored size: 390 Bytes

Contents

#!/usr/bin/env ruby

def newpass(l)
    chars = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789!$%&()=?|@^*'
    password = ''
    l.downto(1) { |i| password << chars[rand(chars.length - 1)] }
    return password
end

puts "Generate random password"

unless ARGV[0]
  puts "Error: Password lenght argument missed"
  exit
else
  puts ARGV[0]
  puts newpass(Integer(ARGV[0]))
end

Version data entries

181 entries across 181 versions & 3 rubygems

Version Path
social_stream-0.30.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.17.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.29.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.16.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.28.4 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.28.1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.28.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.15.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.27.3 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.27.2 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.27.1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.27.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.14.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.26.2 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.13.3 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.13.2 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.26.1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.13.1 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.26.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.13.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password