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-2.2.2 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-2.2.1 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.2.1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.2.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-2.2.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.1.1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.12 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.1.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-2.1.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.0.4 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-2.0.2 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.0.3 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.11 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.10 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.9 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.8 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.0.2 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-2.0.1 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.0.1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.0.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password