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.13.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.1.1 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.14 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.13 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.12 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.1.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.11 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.10 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.9 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.8 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.7 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.6 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.5 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.0.21 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.4 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.3 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.0.20 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.0.19 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.12.2 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-0.0.18 ejabberd/ejabberd_scripts/development_scripts/generate_random_password