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-presence-2.0.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.0.0.beta3 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-2.0.0.beta3 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.0.0.beta2 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-2.0.0.beta2 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-2.0.0.beta1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-2.0.0.beta1 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.7 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.6 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.5 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.4 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.3 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.2 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.1.0 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-1.1.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-1.0.1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-presence-1.0.0 ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.30.2 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password
social_stream-0.30.1 presence/ejabberd/ejabberd_scripts/development_scripts/generate_random_password