mpw 4.1.1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +0 -1
- data/.travis.yml +10 -6
- data/CHANGELOG.md +32 -11
- data/Gemfile +6 -0
- data/README.md +32 -31
- data/VERSION +1 -1
- data/bin/mpw-config +1 -1
- data/bin/mpw-update +2 -0
- data/bin/mpw-wallet +4 -4
- data/i18n/en.yml +50 -48
- data/i18n/fr.yml +2 -0
- data/lib/mpw/cli.rb +81 -56
- data/lib/mpw/config.rb +17 -18
- data/lib/mpw/item.rb +14 -5
- data/lib/mpw/mpw.rb +34 -31
- data/test/files/fixtures-import.yml +19 -0
- data/test/files/fixtures.yml +23 -23
- data/test/init.rb +6 -2
- data/test/test_cli.rb +265 -0
- data/test/test_config.rb +13 -11
- data/test/test_item.rb +75 -73
- data/test/test_mpw.rb +24 -28
- data/test/test_translate.rb +1 -1
- metadata +7 -5
- data/test/tests.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f14b80413b9754b72ffe72f8e6a325d1317b8524
|
4
|
+
data.tar.gz: 2597bfec0629e701de0cc3975556fa8756421751
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7721bc07451e54afafaf6b8a7e5a06f8c1eec663cc9ceb43252fbff2c66d9da4fa6e4d274398372d66693073b061ad81be11ff838246b8f56ffdb088b9ad9677
|
7
|
+
data.tar.gz: 7964cca50b6a4a9e34957acacd322125dd1ffaf3836f0d18b5d929764dd01ada233ae8c2d10dc4f9d4515c6699b2a6373e5d2379a6f2a3baddcb41fa41754c6f
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.4.
|
4
|
-
- 2.3.
|
5
|
-
- 2.2.
|
3
|
+
- 2.4.1
|
4
|
+
- 2.3.4
|
5
|
+
- 2.2.7
|
6
6
|
- 2.1.10
|
7
7
|
install:
|
8
8
|
- bundle install
|
9
|
-
- gem install 'test-unit'
|
10
|
-
- gem install rubocop
|
11
9
|
- echo 9999 > VERSION
|
12
10
|
- gem build mpw.gemspec
|
13
11
|
- gem install mpw-9999.gem
|
14
12
|
script:
|
15
13
|
- rubocop
|
16
|
-
- ruby ./test/
|
14
|
+
- ruby ./test/init.rb
|
15
|
+
- ruby ./test/test_config.rb
|
16
|
+
- ruby ./test/test_item.rb
|
17
|
+
- ruby ./test/test_mpw.rb
|
18
|
+
- ruby ./test/test_translate.rb
|
19
|
+
- ruby ./test/init.rb
|
20
|
+
- ruby ./test/test_cli.rb
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,18 @@
|
|
1
1
|
# CHANGELOG
|
2
|
-
## v4.
|
2
|
+
## v4.2.0 (2017-06-06)
|
3
|
+
|
4
|
+
* feat: improve the interface
|
5
|
+
* feat: add copy url
|
6
|
+
* feat: add unit tests for cli
|
7
|
+
* feat: comment the code with yarn syntax
|
8
|
+
* fix several bugs
|
9
|
+
* fix translations
|
10
|
+
|
11
|
+
## v4.1.1 (2017-05-03)
|
3
12
|
|
4
13
|
* fix bug in init
|
5
14
|
|
6
|
-
## v4.1.0
|
15
|
+
## v4.1.0 (2017-04-22)
|
7
16
|
|
8
17
|
* feat: add options to update or add an item in command line
|
9
18
|
* feat: print config
|
@@ -12,18 +21,18 @@
|
|
12
21
|
* fix: pinentry mode with gpg >= 2.1
|
13
22
|
* remove SSH and FTP synchronization
|
14
23
|
|
15
|
-
## v4.0.0
|
24
|
+
## v4.0.0 (2017-03-09)
|
16
25
|
|
17
26
|
* feature: set default wallet
|
18
27
|
* add option for generate a random password when you update an item
|
19
28
|
* fix encryption when you share an existing wallet
|
20
29
|
* several bugs fix
|
21
30
|
|
22
|
-
## v4.0.0-beta1
|
31
|
+
## v4.0.0-beta1 (2017-02-16)
|
23
32
|
|
24
33
|
* add manage share key with new interface
|
25
34
|
|
26
|
-
## v4.0.0-beta
|
35
|
+
## v4.0.0-beta (2016-11-11)
|
27
36
|
|
28
37
|
* new interface with a table
|
29
38
|
* new command line interface
|
@@ -32,38 +41,50 @@
|
|
32
41
|
* several bugs fix
|
33
42
|
* add unit tests
|
34
43
|
|
35
|
-
## v3.2.1
|
44
|
+
## v3.2.1 (2016-08-06)
|
36
45
|
|
37
46
|
* fix bug when add a new item
|
38
47
|
|
39
|
-
## v3.2.0
|
48
|
+
## v3.2.0 (2016-08-03)
|
40
49
|
|
41
50
|
* add support OTP
|
42
51
|
* fix bug in synchronize
|
43
52
|
* improve interface
|
44
53
|
|
45
|
-
## v3.1.0
|
54
|
+
## v3.1.0 (2016-07-09)
|
46
55
|
|
47
56
|
* add clipboard
|
48
57
|
* can change gpg version
|
49
58
|
* minor change in interface
|
50
59
|
* several bugs fix
|
51
60
|
|
52
|
-
## v3.0.0
|
61
|
+
## v3.0.0 (2016-07-05)
|
53
62
|
|
54
63
|
* new storage format
|
55
64
|
* new share system
|
56
65
|
* remove MPW server
|
57
66
|
|
58
|
-
## v2.0.
|
67
|
+
## v2.0.3 (2015-09-27)
|
68
|
+
|
69
|
+
* add no-sync option
|
70
|
+
|
71
|
+
## v2.0.1 (2015-06-23)
|
72
|
+
|
73
|
+
* fix mpw-ssh
|
74
|
+
|
75
|
+
## v2.0.0 (2015-06-22)
|
59
76
|
|
60
77
|
* change format csv to yaml
|
61
78
|
* easy install with gem
|
62
79
|
* add sync with ftp and ssh
|
63
80
|
* many improvement
|
64
81
|
|
65
|
-
## v1.1.0
|
82
|
+
## v1.1.0 (2014-01-28)
|
66
83
|
|
67
84
|
* Add sync with MPW Server
|
68
85
|
* Add MPW Server
|
69
86
|
* Fix minors bugs
|
87
|
+
|
88
|
+
## v1.0.0 (2014-01-15)
|
89
|
+
|
90
|
+
* first release
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# MPW: Manage your passwords!
|
2
|
-
[![Version](https://img.shields.io/badge/latest_version-4.
|
2
|
+
[![Version](https://img.shields.io/badge/latest_version-4.2.0-green.svg)](https://github.com/nishiki/manage-password/releases)
|
3
3
|
[![Build Status](https://travis-ci.org/nishiki/manage-password.svg?branch=master)](https://travis-ci.org/nishiki/manage-password)
|
4
4
|
[![License](https://img.shields.io/badge/license-GPL--2.0-blue.svg)](https://github.com/nishiki/manage-password/blob/master/LICENSE)
|
5
5
|
|
@@ -31,7 +31,9 @@ mpw config --init user@host.com
|
|
31
31
|
|
32
32
|
Add your first item:
|
33
33
|
```
|
34
|
-
mpw add
|
34
|
+
mpw add --host assurance.com --port 443 --user user_2132 --protocol https --random
|
35
|
+
mpw add --host fric.com --user 230403 --otp-code 23434113 --protocol https --comment 'I love my bank' --random
|
36
|
+
|
35
37
|
```
|
36
38
|
|
37
39
|
And list your items:
|
@@ -40,46 +42,45 @@ mpw list
|
|
40
42
|
```
|
41
43
|
or search an item with
|
42
44
|
```
|
43
|
-
mpw list --pattern
|
45
|
+
mpw list --pattern love
|
44
46
|
mpw list --group bank
|
45
47
|
```
|
46
48
|
|
47
49
|
Output:
|
48
50
|
```
|
49
|
-
|
50
|
-
|
51
|
-
ID | Host
|
52
|
-
|
53
|
-
1 |
|
54
|
-
|
55
|
-
Linux
|
56
|
-
==============================================================================
|
57
|
-
ID | Host | User | Protocol | Port | OTP | Comment
|
58
|
-
==============================================================================
|
59
|
-
2 | linuxfr.org | example | https | | | Da Linux French Site
|
51
|
+
Assurance
|
52
|
+
==========================================================================
|
53
|
+
ID | Host | User | OTP | Comment
|
54
|
+
==========================================================================
|
55
|
+
1 | https://assurance.com:443 | user_2132 | |
|
60
56
|
|
57
|
+
Bank
|
58
|
+
==========================================================================
|
59
|
+
ID | Host | User | OTP | Comment
|
60
|
+
==========================================================================
|
61
|
+
3 | https://fric.com | 230403 | X | I love my bank
|
61
62
|
```
|
62
63
|
|
63
64
|
Copy a password, login or OTP code:
|
64
65
|
```
|
65
|
-
mpw copy -p
|
66
|
+
mpw copy -p assurance.com
|
66
67
|
```
|
67
68
|
|
68
69
|
Update an item:
|
69
70
|
```
|
70
|
-
mpw update -p
|
71
|
+
mpw update -p assurance.com
|
71
72
|
```
|
72
73
|
|
73
74
|
Delete an item:
|
74
75
|
```
|
75
|
-
mpw delete -p
|
76
|
+
mpw delete -p assurance.com
|
76
77
|
```
|
77
78
|
|
78
79
|
### Manage wallets
|
79
80
|
|
80
81
|
List all available wallets:
|
81
82
|
```
|
82
|
-
mpw wallet
|
83
|
+
mpw wallet
|
83
84
|
```
|
84
85
|
|
85
86
|
List all GPG keys in wallet:
|
@@ -116,23 +117,23 @@ Example yaml file for mpw:
|
|
116
117
|
```
|
117
118
|
---
|
118
119
|
1:
|
119
|
-
host:
|
120
|
-
user:
|
120
|
+
host: fric.com
|
121
|
+
user: 230403
|
121
122
|
group: Bank
|
122
|
-
password:
|
123
|
+
password: 5XdiTQOubRDw9B0aJoMlcEyL
|
123
124
|
protocol: https
|
124
|
-
port:
|
125
|
-
otp_key:
|
126
|
-
comment:
|
125
|
+
port:
|
126
|
+
otp_key: 330223432
|
127
|
+
comment: I love my bank
|
127
128
|
2:
|
128
|
-
host:
|
129
|
-
user:
|
130
|
-
group:
|
131
|
-
password:
|
129
|
+
host: assurance.com
|
130
|
+
user: user_2132
|
131
|
+
group: Assurance
|
132
|
+
password: DMyK6B3v4bWO52VzU7aTHIem
|
132
133
|
protocol: https
|
133
|
-
port:
|
134
|
-
otp_key:
|
135
|
-
comment:
|
134
|
+
port: 443
|
135
|
+
otp_key:
|
136
|
+
comment:
|
136
137
|
```
|
137
138
|
|
138
139
|
### Config
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.2.0
|
data/bin/mpw-config
CHANGED
@@ -88,7 +88,7 @@ OptionParser.new do |opts|
|
|
88
88
|
values[:pwd_special] = true
|
89
89
|
end
|
90
90
|
|
91
|
-
opts.on('-S', '--
|
91
|
+
opts.on('-S', '--disable-special-chars', I18n.t('option.special_chars')) do
|
92
92
|
values[:pwd_special] = false
|
93
93
|
end
|
94
94
|
|
data/bin/mpw-update
CHANGED
data/bin/mpw-wallet
CHANGED
@@ -74,12 +74,10 @@ cli = MPW::Cli.new(config)
|
|
74
74
|
|
75
75
|
cli.load_config
|
76
76
|
|
77
|
-
if options.key?(:
|
78
|
-
cli.list_wallet
|
79
|
-
elsif options.key?(:path)
|
77
|
+
if options.key?(:path)
|
80
78
|
cli.get_wallet(options[:wallet])
|
81
79
|
cli.set_wallet_path(options[:path])
|
82
|
-
|
80
|
+
elsif options.key?(:list_keys) || options.key?(:gpg_key)
|
83
81
|
cli.get_wallet(options[:wallet])
|
84
82
|
cli.decrypt
|
85
83
|
|
@@ -88,4 +86,6 @@ else
|
|
88
86
|
elsif options.key?(:gpg_key)
|
89
87
|
options[:delete] ? cli.delete_key(options[:gpg_key]) : cli.add_key(options[:gpg_key])
|
90
88
|
end
|
89
|
+
else
|
90
|
+
cli.list_wallet
|
91
91
|
end
|
data/i18n/en.yml
CHANGED
@@ -5,27 +5,27 @@ en:
|
|
5
5
|
config:
|
6
6
|
write: "Can't write the config file!"
|
7
7
|
load: "Checkconfig failed!"
|
8
|
-
key_bad_format: "The key string isn't in
|
9
|
-
no_key_public: "You haven't the public key of %{key}!"
|
8
|
+
key_bad_format: "The key string isn't in the right format!"
|
9
|
+
no_key_public: "You haven't entered the public key of %{key}!"
|
10
10
|
genkey_gpg:
|
11
11
|
exception: "Can't create the GPG key!"
|
12
12
|
name: "You must define a name for your GPG key!"
|
13
13
|
password: "You must define a password for your GPG key!"
|
14
|
-
empty: "The class is
|
14
|
+
empty: "The class is empty"
|
15
15
|
export: "Can't export, unable to write in %{file}!"
|
16
16
|
export_key: "Can't export the GPG key"
|
17
17
|
gpg_file:
|
18
18
|
decrypt: "Can't decrypt file!"
|
19
19
|
encrypt: "Can't encrypt the GPG file!"
|
20
20
|
mpw_file:
|
21
|
-
read_data: "Can't
|
22
|
-
write_data: "Can't
|
21
|
+
read_data: "Can't read the MPW file!"
|
22
|
+
write_data: "Can't write the MPW file!"
|
23
23
|
import: "Can't import, unable to read %{file}!"
|
24
24
|
update:
|
25
25
|
host_empty: "You must define a host!"
|
26
26
|
|
27
27
|
warning:
|
28
|
-
select: 'Your choice is not a valid
|
28
|
+
select: 'Your choice is not a valid item!'
|
29
29
|
|
30
30
|
command:
|
31
31
|
add: "Add a new item"
|
@@ -41,37 +41,37 @@ en:
|
|
41
41
|
|
42
42
|
option:
|
43
43
|
add: "Add an item or key"
|
44
|
-
add_gpg_key: "Share the wallet with
|
45
|
-
alpha: "Use letter to
|
44
|
+
add_gpg_key: "Share the wallet with another GPG key"
|
45
|
+
alpha: "Use letter to create a password"
|
46
46
|
comment: "Specify a comment"
|
47
47
|
config: "Specify the configuration file to use"
|
48
48
|
clipboard: "Disable the clipboard feature"
|
49
|
-
default_path: "Move the wallet
|
49
|
+
default_path: "Move the wallet to the default directory"
|
50
50
|
default_wallet: "Specify the default wallet to use"
|
51
|
-
delete_gpg_key: "Delete
|
52
|
-
disable_alpha: "Don't use
|
53
|
-
disable_numeric: "Don't use
|
51
|
+
delete_gpg_key: "Delete wallet sharing with an other GPG key"
|
52
|
+
disable_alpha: "Don't use letters to create a password"
|
53
|
+
disable_numeric: "Don't use numbers to generate a password"
|
54
54
|
disable_pinmode: "Disable the pinentry mode"
|
55
|
-
disable_special_chars: "Don't use special char to
|
55
|
+
disable_special_chars: "Don't use special char to create a password"
|
56
56
|
export: "Export a wallet in an yaml file"
|
57
|
-
file_export: "Specify the file
|
57
|
+
file_export: "Specify the file to export data"
|
58
58
|
file_import: "Specify the file to import"
|
59
|
-
force: "
|
60
|
-
generate_password: "
|
59
|
+
force: "Do not ask confirmation when deleting an item"
|
60
|
+
generate_password: "Create a random password (default 8 characters)"
|
61
61
|
gpg_exe: "Set the gpg binary path to use"
|
62
62
|
gpg_key: "Specify a GPG key (ex: user@example.com)"
|
63
63
|
group: "Search the items with specified group"
|
64
64
|
help: "Show this help message"
|
65
65
|
host: "Specify a host or ip"
|
66
66
|
init: "Initialize mpw"
|
67
|
-
import: "Import item
|
68
|
-
key: "
|
67
|
+
import: "Import item from an yaml file"
|
68
|
+
key: "Define the key name"
|
69
69
|
lang: "Set the software language"
|
70
70
|
length: "Size of the password"
|
71
71
|
list: "List the wallets"
|
72
72
|
list_keys: "List the GPG keys in wallet"
|
73
|
-
new_group: "
|
74
|
-
numeric: "Use number to
|
73
|
+
new_group: "Define a group for the item"
|
74
|
+
numeric: "Use number to create a password"
|
75
75
|
otp_code: "Set an otp key"
|
76
76
|
path: "Move the wallet in new specify directory"
|
77
77
|
pattern: "Given search pattern"
|
@@ -81,11 +81,11 @@ en:
|
|
81
81
|
random_password: "Generate a random password"
|
82
82
|
setup: "Create a new configuration file"
|
83
83
|
setup_wallet: "Create a new configuration file for a wallet"
|
84
|
-
special_chars: "Use special char to
|
85
|
-
show: "Search and
|
86
|
-
show_all: "
|
84
|
+
special_chars: "Use special char to create a password"
|
85
|
+
show: "Search and display the items"
|
86
|
+
show_all: "Listing all items"
|
87
87
|
text_editor: "Use text editor to edit the item"
|
88
|
-
usage: "
|
88
|
+
usage: "Use"
|
89
89
|
user: "Set an user"
|
90
90
|
wallet: "Specify a wallet to use"
|
91
91
|
wallet_dir: "Set the wallets folder"
|
@@ -95,13 +95,13 @@ en:
|
|
95
95
|
add_key:
|
96
96
|
valid: "Key has been added!"
|
97
97
|
add_item:
|
98
|
-
name: "
|
99
|
-
group: "
|
100
|
-
host: "
|
101
|
-
protocol: "
|
102
|
-
login: "
|
103
|
-
password: "
|
104
|
-
port: "
|
98
|
+
name: "Item name (mandatory)"
|
99
|
+
group: "Group name"
|
100
|
+
host: "Hostname or ip"
|
101
|
+
protocol: "Connection protocol (ssh, http, ...)"
|
102
|
+
login: "Connection ID"
|
103
|
+
password: "Password"
|
104
|
+
port: "Connection port"
|
105
105
|
comment: "A comment"
|
106
106
|
otp_key: "The OTP secret"
|
107
107
|
valid: "Item has been added!"
|
@@ -110,9 +110,11 @@ en:
|
|
110
110
|
clean: "The clipboard has been cleaned."
|
111
111
|
login: "The login has been copied in clipboard."
|
112
112
|
password: "The password has been copied in clipboard for 30s!"
|
113
|
-
otp: "The OTP code has been copied
|
113
|
+
otp: "The OTP code has been copied %{time}s!"
|
114
|
+
url: "The URL has been copied in clipboard."
|
114
115
|
help:
|
115
116
|
name: "Help"
|
117
|
+
url: "Press <u> to copy URL"
|
116
118
|
login: "Press <l> to copy the login"
|
117
119
|
password: "Press <p> to copy the password"
|
118
120
|
otp_code: "Press <o> to copy the otp code"
|
@@ -120,18 +122,18 @@ en:
|
|
120
122
|
delete_key:
|
121
123
|
valid: "Key has been deleted!"
|
122
124
|
delete_item:
|
123
|
-
ask: "Are you sure you want to remove
|
125
|
+
ask: "Are you sure you want to remove this item ?"
|
124
126
|
valid: "The item has been removed!"
|
125
127
|
import:
|
126
128
|
ask: "Are you sure you want to import this file %{file} ?"
|
127
129
|
file_empty: "The import file is empty!"
|
128
130
|
file_not_exist: "The import file doesn't exist!"
|
129
|
-
valid: "The import is
|
131
|
+
valid: "The import is successful!"
|
130
132
|
not_valid: "No data to import!"
|
131
133
|
set_config:
|
132
134
|
valid: "The config file has been edited!"
|
133
135
|
set_wallet_path:
|
134
|
-
valid: "The wallet has
|
136
|
+
valid: "The wallet has been moved!"
|
135
137
|
setup_config:
|
136
138
|
title: "Setup a new config file"
|
137
139
|
lang: "Choose your language (en, fr, ...) [default=%{lang}]: "
|
@@ -141,36 +143,36 @@ en:
|
|
141
143
|
valid: "The config file has been created!"
|
142
144
|
setup_gpg_key:
|
143
145
|
title: "Setup a GPG key"
|
144
|
-
ask: "Do you want create your GPG key ? (Y/n)"
|
145
|
-
no_create: "You must create manually your GPG key or relaunch the software."
|
146
|
+
ask: "Do you want to create your GPG key ? (Y/n)"
|
147
|
+
no_create: "You must to create manually your GPG key or relaunch the software."
|
146
148
|
name: "Your name and lastname: "
|
147
149
|
password: "A password for the GPG key: "
|
148
150
|
confirm_password: "Confirm your password: "
|
149
151
|
error_password: "Your passwords aren't identical!"
|
150
152
|
length: "Size of the GPG key [default=2048]: "
|
151
153
|
expire: "Expire time of the GPG key [default=0 (unlimited)]: "
|
152
|
-
wait: "Please
|
154
|
+
wait: "Please wait until GPG key is created, this process can take a few minutes."
|
153
155
|
valid: "Your GPG key has been created ;-)"
|
154
156
|
update_item:
|
155
|
-
name: "
|
156
|
-
group: "
|
157
|
-
host: "
|
158
|
-
protocol: "
|
159
|
-
login: "
|
160
|
-
password: "
|
161
|
-
port: "
|
157
|
+
name: "Item name (mandatory)"
|
158
|
+
group: "Group name"
|
159
|
+
host: "Hostname or ip"
|
160
|
+
protocol: "Connection protocol (ssh, http, ...)"
|
161
|
+
login: "Login id"
|
162
|
+
password: "Password (leave empty if you don't want to update it)"
|
163
|
+
port: "Connection port"
|
162
164
|
comment: "A comment"
|
163
|
-
otp_key: "
|
165
|
+
otp_key: "Secret OTP (leave empty if you don't want to update it"
|
164
166
|
valid: "Item has been updated!"
|
165
167
|
export:
|
166
|
-
valid: "The export in %{file} is
|
168
|
+
valid: "The export in %{file} is successful!"
|
167
169
|
|
168
170
|
display:
|
169
171
|
comment: "Comment"
|
170
172
|
config: "Configuration"
|
171
173
|
error: "ERROR"
|
172
174
|
keys: "GPG keys"
|
173
|
-
gpg_password: "GPG
|
175
|
+
gpg_password: "GPG password: "
|
174
176
|
group: "Group"
|
175
177
|
login: "Login"
|
176
178
|
name: "Name"
|