password_genie 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +29 -0
- data/lib/password_genie.rb +105 -92
- metadata +71 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb18ea5429fa9a7316f37b685361f4a68384f66d
|
4
|
+
data.tar.gz: a2591d05d83ece6b811ab93be992135454922bda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc075697ec601c32bd233de8f3138ec13debfc1ecb9518a0c2cb273f7122cdf9e71bdf2c564a6ff01c856c1828e16e4a34959afa58bf02eaef5fab1b6b66d776
|
7
|
+
data.tar.gz: 40f602b08d8d8967eba87ba044ccee54a390474026843667bd97ff9f907e946abf49a9c08ee6539b68332bb0c9a7ef798139a0d0be5e885cf6acd4c457fbf89e
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# PasswordGenie
|
2
|
+
|
3
|
+
a tool that:
|
4
|
+
1. generates a custom password/pin numbers based on a user's specifications
|
5
|
+
2. store password/pin and corresponding usernames and site names
|
6
|
+
3. introduces a search function to retrieve user info and
|
7
|
+
4. allows a user to push an already existing password, site, and username info into a sqlite db
|
8
|
+
|
9
|
+
This version includes general bug fix and bundle migration.
|
10
|
+
|
11
|
+
To ensure data preservation, relocate db file when updating.
|
12
|
+
|
13
|
+
## Development
|
14
|
+
|
15
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
16
|
+
|
17
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
18
|
+
|
19
|
+
## Contributing
|
20
|
+
|
21
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/mepyyeti/password_genie. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
22
|
+
|
23
|
+
## License
|
24
|
+
|
25
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
26
|
+
|
27
|
+
## Code of Conduct
|
28
|
+
|
29
|
+
Everyone interacting in the PasswordGenie project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/password_genie/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/password_genie.rb
CHANGED
@@ -1,111 +1,124 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#password_genie.rb
|
3
3
|
|
4
|
-
require
|
4
|
+
require "password_genie_cl"
|
5
|
+
require "password_genie/version"
|
5
6
|
|
6
|
-
|
7
|
+
module PasswordGenie
|
8
|
+
class Error < StandardError; end
|
9
|
+
|
10
|
+
go = true
|
7
11
|
|
8
|
-
while go
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
choice = gets.chomp.to_i
|
14
|
-
|
15
|
-
if choice == 1
|
16
|
-
puts "you will now design a custom password!"
|
17
|
-
print "How long do you want your password to be?: "
|
12
|
+
while go
|
13
|
+
puts "enter [1] to CREATE a new password\nenter [2] to LOOKUP a password"
|
14
|
+
puts "enter [3] to ADD a password\nenter [4] to CHANGE an existing password"
|
15
|
+
puts "enter [5] to EXIT"
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
unless number = Integer(number) rescue next
|
22
|
-
end
|
17
|
+
choice = gets.chomp
|
23
18
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
next
|
28
|
-
else
|
29
|
-
word_number = "characters"
|
19
|
+
while choice.empty? || !choice.is_a?(Integer)
|
20
|
+
print "please select a number choice from the options above: "
|
21
|
+
choice = gets.chomp
|
30
22
|
end
|
31
|
-
puts "your word bank will contain #{number} #{word_number}."
|
32
23
|
|
33
|
-
|
34
|
-
words = gets.chomp
|
35
|
-
if words == '' || words == ' '
|
36
|
-
puts "you have elected to create a custom numeric pin"
|
37
|
-
end
|
24
|
+
choice=Integer(choice)
|
38
25
|
|
39
|
-
|
40
|
-
|
41
|
-
print
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
26
|
+
if choice == 1
|
27
|
+
puts "you will now design a custom password!"
|
28
|
+
print "How long do you want your password to be?: "
|
29
|
+
|
30
|
+
number = gets.chomp
|
31
|
+
|
32
|
+
unless number = Integer(number) rescue next
|
33
|
+
end
|
34
|
+
|
35
|
+
if number == 1
|
36
|
+
word_number = "character"
|
37
|
+
elsif number == 0
|
38
|
+
next
|
39
|
+
else
|
40
|
+
word_number = "characters"
|
41
|
+
end
|
42
|
+
puts "your word bank will contain #{number} #{word_number}."
|
43
|
+
|
44
|
+
print "please compile your word bank ([Enter] for PIN): "
|
45
|
+
words = gets.chomp
|
46
|
+
if words == '' || words == ' '
|
47
|
+
puts "you have elected to create a custom numeric pin"
|
48
|
+
end
|
49
|
+
|
50
|
+
x = WordBank.new(words,number)
|
51
|
+
unless words == '' || words == ' '
|
52
|
+
print 'do you wish to include any capitalized letters from your word bank? [y/n]: '
|
53
|
+
cap_char = gets.chomp
|
54
|
+
x.add_caps unless cap_char == "n"
|
55
|
+
print 'do you wish to include special characters such as "." "," and "$"? [y/n]: '
|
56
|
+
special_char = gets.chomp
|
57
|
+
x.add_special_chars unless special_char == "n"
|
58
|
+
print "do you wish to include numbers? [y/n]: "
|
59
|
+
num_chc = gets.chomp
|
60
|
+
x.add_numbers unless num_chc == 'n'
|
61
|
+
end
|
62
|
+
if words == '' || words == ' '
|
63
|
+
x.add_numbers
|
64
|
+
end
|
65
|
+
x.create
|
66
|
+
|
67
|
+
puts "done.\n\n"
|
68
|
+
print "\tto save, please enter 'save': "
|
69
|
+
choice = gets.chomp.downcase
|
70
|
+
if choice == 'save' || choice == 's' || choice == 'yes' || choice == 'y'
|
71
|
+
print "enter site: "
|
72
|
+
site = gets.chomp.downcase
|
73
|
+
print "enter username: "
|
74
|
+
username = gets.chomp.to_s
|
75
|
+
x.save_info(site,username)
|
76
|
+
end
|
55
77
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
78
|
+
print "go again? [y/n]: "
|
79
|
+
choice = gets.chomp
|
80
|
+
unless choice == 'y'
|
81
|
+
go = false
|
82
|
+
end
|
83
|
+
next
|
84
|
+
elsif choice == 2
|
85
|
+
print "enter the word you want to search for (usually site or username): "
|
86
|
+
word = gets.chomp.to_s
|
87
|
+
x = WordBank.new(word)
|
88
|
+
x.find_info(word)
|
89
|
+
next
|
90
|
+
elsif choice == 3 || choice == 4
|
91
|
+
if choice == 4
|
92
|
+
puts "**MUST supply an EXISTING site and username**"
|
93
|
+
end
|
60
94
|
print "enter site: "
|
61
|
-
site = gets.chomp
|
95
|
+
site = gets.chomp
|
62
96
|
print "enter username: "
|
63
|
-
username = gets.chomp
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
puts "**MUST supply an EXISTING site and username**"
|
82
|
-
end
|
83
|
-
print "enter site: "
|
84
|
-
site = gets.chomp
|
85
|
-
print "enter username: "
|
86
|
-
username = gets.chomp
|
87
|
-
if site == '' || username == ''
|
88
|
-
puts "BOTH site and username must be filled in. Back to the beginning."
|
97
|
+
username = gets.chomp
|
98
|
+
if site == '' || username == ''
|
99
|
+
puts "BOTH site and username must be filled in. Back to the beginning."
|
100
|
+
next
|
101
|
+
end
|
102
|
+
if choice == 4
|
103
|
+
print "enter new password: "
|
104
|
+
else
|
105
|
+
print "enter password: "
|
106
|
+
end
|
107
|
+
password = gets.chomp
|
108
|
+
if password != ''
|
109
|
+
x = WordBank.new(site)
|
110
|
+
x.add_or_replace_info(site, username, password, choice)
|
111
|
+
else
|
112
|
+
print "password can't be blank."
|
113
|
+
next
|
114
|
+
end
|
89
115
|
next
|
90
|
-
|
91
|
-
|
92
|
-
print "enter new password: "
|
93
|
-
else
|
94
|
-
print "enter password: "
|
95
|
-
end
|
96
|
-
password = gets.chomp
|
97
|
-
if password != ''
|
98
|
-
x = WordBank.new(site)
|
99
|
-
x.add_or_replace_info(site, username, password, choice)
|
116
|
+
elsif choice == 5
|
117
|
+
go = false
|
100
118
|
else
|
101
|
-
print "password can't be blank."
|
102
119
|
next
|
103
120
|
end
|
104
|
-
|
105
|
-
elsif choice == 5
|
106
|
-
go = false
|
107
|
-
else
|
108
|
-
next
|
121
|
+
|
109
122
|
end
|
110
|
-
|
123
|
+
|
111
124
|
end
|
metadata
CHANGED
@@ -1,30 +1,89 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: password_genie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- mepyyeti
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
12
|
-
dependencies:
|
11
|
+
date: 2019-04-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 10.5.0
|
37
|
+
type: :development
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '10.0'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 10.5.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sqlite3
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.4.0
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.4.0
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 1.4.0
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 1.4.0
|
13
67
|
description: a simple tool to build a password/pin number sqlite repository based
|
14
68
|
on user defined parameters 2. archive passwords/pin numbers, usernames, and corresponding
|
15
|
-
site data 3. and search data. requires sqlite3
|
16
|
-
email:
|
69
|
+
site data 3. and search data. requires sqlite3. minor big fixes and bundle migration.
|
70
|
+
email:
|
71
|
+
- rcabej@gmail.com
|
17
72
|
executables: []
|
18
73
|
extensions: []
|
19
74
|
extra_rdoc_files: []
|
20
75
|
files:
|
76
|
+
- README.md
|
21
77
|
- lib/password_genie.rb
|
22
78
|
- lib/password_genie_cl.rb
|
23
|
-
homepage: https://github.com/mepyyeti/password_genie
|
79
|
+
homepage: https://www.github.com/mepyyeti/password_genie
|
24
80
|
licenses:
|
25
81
|
- MIT
|
26
|
-
metadata:
|
27
|
-
|
82
|
+
metadata:
|
83
|
+
allowed_push_host: https://rubygems.org
|
84
|
+
homepage_uri: https://www.github.com/mepyyeti/password_genie
|
85
|
+
source_code_uri: https://www.github.com/mepyyeti/password_genie
|
86
|
+
post_install_message: thx. https://www.github.com/mepyyeti/password_genie
|
28
87
|
rdoc_options: []
|
29
88
|
require_paths:
|
30
89
|
- lib
|
@@ -40,8 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
40
99
|
version: '0'
|
41
100
|
requirements: []
|
42
101
|
rubyforge_project:
|
43
|
-
rubygems_version: 2.5.2.
|
102
|
+
rubygems_version: 2.5.2.3
|
44
103
|
signing_key:
|
45
104
|
specification_version: 4
|
46
|
-
summary:
|
105
|
+
summary: minor bug fixes and bundle migration.
|
47
106
|
test_files: []
|