genpass 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/genpass +11 -0
- metadata +71 -0
data/genpass
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
def generate_password(len = 8)
|
4
|
+
chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
|
5
|
+
newpass = ""
|
6
|
+
1.upto(len) { |i| newpass << chars[rand(chars.size)] }
|
7
|
+
newpass
|
8
|
+
end
|
9
|
+
|
10
|
+
len = ARGV[0] ? ARGV[0].to_i : 8
|
11
|
+
puts "\e[32m#{generate_password(len)}\e[0m"
|
metadata
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: genpass
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Christoffer Lejdborg
|
14
|
+
autorequire:
|
15
|
+
bindir: .
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-01-22 00:00:00 +01:00
|
19
|
+
default_executable: genpass
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: GenPass is a minimalistic password generator that works in the terminal. "genpass {length}" will return a safe, random password at the specified length.
|
23
|
+
email: hello@9muses.se
|
24
|
+
executables:
|
25
|
+
- genpass
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
|
+
files:
|
31
|
+
- ./genpass
|
32
|
+
has_rdoc: true
|
33
|
+
homepage: http://github.com/Lejdborg/GenPass
|
34
|
+
licenses: []
|
35
|
+
|
36
|
+
post_install_message:
|
37
|
+
rdoc_options: []
|
38
|
+
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 57
|
47
|
+
segments:
|
48
|
+
- 1
|
49
|
+
- 8
|
50
|
+
- 7
|
51
|
+
version: 1.8.7
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 23
|
58
|
+
segments:
|
59
|
+
- 1
|
60
|
+
- 3
|
61
|
+
- 6
|
62
|
+
version: 1.3.6
|
63
|
+
requirements: []
|
64
|
+
|
65
|
+
rubyforge_project:
|
66
|
+
rubygems_version: 1.4.2
|
67
|
+
signing_key:
|
68
|
+
specification_version: 3
|
69
|
+
summary: Minimalistic password generator.
|
70
|
+
test_files: []
|
71
|
+
|