pass-station 1.2.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +2 -1
- data/bin/pass-station +29 -22
- data/data/DefaultCreds-Cheat-Sheet.csv +251 -196
- data/data/many-passwords.csv +2791 -0
- data/lib/pass_station/output.rb +23 -24
- data/lib/pass_station/parse.rb +5 -4
- data/lib/pass_station/search.rb +10 -8
- data/lib/pass_station/source.rb +52 -17
- data/lib/pass_station/version.rb +1 -1
- data/lib/pass_station.rb +10 -7
- metadata +12 -128
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dce80d32341aedab22c054f5bba662411df09d1d585e8e7988fcbc6cb7a14a6c
|
4
|
+
data.tar.gz: cc71183091fed6f3766f7d4390973ecc869022a8760ebd8706d837066f240610
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b48de95b152bcb493551c380390d528de04d61e36123d06d5ec62f2cc3bafd987ec8e411f8b10ef109b1ec116f08375f367da20860ee79813cf92a866d9efad
|
7
|
+
data.tar.gz: b5b30dc1e5885101617d0d893286d6b1086672fc8fd01d2a2767336f37c5d96551d76366897d3193d8e9828ac57fbc7333504895f7b661f30a44210ddfa6d229
|
data/LICENSE
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
|
+
Copyright (c) 2021 Alexandre ZANNI
|
3
4
|
Copyright (c) 2021 Alexandre ZANNI at SEC-IT
|
4
5
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -18,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
19
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
20
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
21
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
22
|
+
SOFTWARE.
|
data/bin/pass-station
CHANGED
@@ -11,11 +11,11 @@ require 'docopt'
|
|
11
11
|
require 'paint'
|
12
12
|
|
13
13
|
doc = <<~DOCOPT
|
14
|
-
Pass Station
|
14
|
+
Pass Station v#{PassStation::VERSION}
|
15
15
|
|
16
16
|
Usage:
|
17
|
-
pass-station list [--sort <col> --output <format>] [--debug]
|
18
|
-
pass-station search <term> [--field <col> --sort <col> --sensitive --output <format>] [--no-color --debug]
|
17
|
+
pass-station list [--sort <col> --output <format>] [--source <id> --debug]
|
18
|
+
pass-station search <term> [--field <col> --sort <col> --sensitive --output <format>] [--source <id> --no-color --debug]
|
19
19
|
pass-station update ([--force] <path> | --check) [--debug]
|
20
20
|
pass-station -h | --help
|
21
21
|
pass-station --version
|
@@ -24,10 +24,10 @@ doc = <<~DOCOPT
|
|
24
24
|
|
25
25
|
Output options: can be used with list and search commands
|
26
26
|
-o <format>, --output <format> Output format: JSON, CSV, YAML, table, pretty-table [default: pretty-table]
|
27
|
-
-s <col>, --sort <col> Sort by column
|
27
|
+
-s <col>, --sort <col> Sort by column (see documentation, columns depends on the database source)
|
28
28
|
|
29
29
|
Search options:
|
30
|
-
--field <col> Search in column:
|
30
|
+
--field <col> Search in column: column name (see documentation, columns depends on the database source) or all
|
31
31
|
--sensitive Search is case sensitive (case insensitive by default)
|
32
32
|
|
33
33
|
Update options: update the password database (replace Pass Station DB with upstream DB, use with care)
|
@@ -35,10 +35,11 @@ doc = <<~DOCOPT
|
|
35
35
|
-c, --check Check for possible update
|
36
36
|
|
37
37
|
Other options:
|
38
|
-
--
|
39
|
-
--
|
40
|
-
|
41
|
-
--
|
38
|
+
--source <id> Credentials source database: 1 (Default Credentials Cheat Sheet), 2 (Many passwords) [default: 1]
|
39
|
+
--no-color Disable colorized output
|
40
|
+
--debug Display arguments
|
41
|
+
-h, --help Show this screen
|
42
|
+
--version Show version
|
42
43
|
DOCOPT
|
43
44
|
|
44
45
|
begin
|
@@ -47,14 +48,17 @@ begin
|
|
47
48
|
pp args if args['--debug']
|
48
49
|
if args['update']
|
49
50
|
if args['<path>']
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
51
|
+
PassStation::DB::UPSTREAM_DATABASE[:MAPPING].each do |k, v|
|
52
|
+
opts = {}
|
53
|
+
opts[:sha256] = args['--force'] ? nil : PassStation::DB::UPSTREAM_DATABASE[v][:HASH]
|
54
|
+
puts "[+] Updating database: #{v}"
|
55
|
+
opts[:source_db] = k
|
56
|
+
path = PassStation::DB.download_upstream(args['<path>'], opts)
|
57
|
+
if path
|
58
|
+
puts "[+] Database updated: #{v} (#{path})"
|
59
|
+
else
|
60
|
+
puts "[+] Database #{v} already up to date"
|
61
|
+
end
|
58
62
|
end
|
59
63
|
elsif args['--check']
|
60
64
|
if PassStation::DB.check_for_update
|
@@ -64,13 +68,16 @@ begin
|
|
64
68
|
end
|
65
69
|
end
|
66
70
|
elsif args['list']
|
67
|
-
|
68
|
-
ps.
|
71
|
+
db = args['--source'].nil? ? nil : args['--source'].to_i
|
72
|
+
ps = PassStation::DB.new(db)
|
73
|
+
args['--sort'].nil? ? ps.parse : ps.parse(args['--sort'].to_sym)
|
69
74
|
puts ps.output_list(args['--output'])
|
70
75
|
elsif args['search']
|
71
|
-
|
72
|
-
ps.
|
73
|
-
|
76
|
+
db = args['--source'].nil? ? nil : args['--source'].to_i
|
77
|
+
ps = PassStation::DB.new(db)
|
78
|
+
args['--sort'].nil? ? ps.parse : ps.parse(args['--sort'].to_sym)
|
79
|
+
field = args['--field'].nil? ? nil : args['--field'].to_sym
|
80
|
+
ps.search(args['<term>'], field, sensitive: args['--sensitive'])
|
74
81
|
output = ps.output_search(args['--output'])
|
75
82
|
puts '[-] No result' if output.empty?
|
76
83
|
puts ps.highlight_found(args['<term>'], output, args['--sensitive'])
|