haiti-hash 1.3.0 → 1.4.0
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/LICENSE.txt +1 -1
- data/bin/haiti +19 -1
- data/data/prototypes.json +811 -159
- data/lib/haiti/version.rb +1 -1
- data/lib/haiti.rb +19 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2e7a6b60ddba680ddca4da6e2590476df6892ce48fe6558435f88cd93f6f6f7
|
|
4
|
+
data.tar.gz: 2d507b8def07e98025e1bf8165ba96f0f0dc703c5136e98a019220915e4d6a2c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aab1cda69c1f598173545c62b3010a7feeaffd11470cb892e14c7ddda04e977dc7fff3cefe66b6f424f2521123c7cd8b7858fcc10832365fd44d817fc481b9ca
|
|
7
|
+
data.tar.gz: 3f1e6a4a2dcde7d4e21accdd65f2932bd346913ca4876b1754b2f167611606c48faf486fa3b6f23b6fcc5d258dba91b1073552b81a68200698139ee5aea50aef
|
data/LICENSE.txt
CHANGED
data/bin/haiti
CHANGED
|
@@ -10,13 +10,22 @@ require 'docopt'
|
|
|
10
10
|
require 'paint'
|
|
11
11
|
|
|
12
12
|
doc = <<~DOCOPT
|
|
13
|
-
HAITI
|
|
13
|
+
HAITI (HAsh IdenTifIer) v#{HashIdentifier::VERSION}
|
|
14
14
|
|
|
15
15
|
Usage:
|
|
16
16
|
haiti [options] <hash>
|
|
17
|
+
haiti samples (<ref> | <name>)
|
|
17
18
|
haiti -h | --help
|
|
18
19
|
haiti --version
|
|
19
20
|
|
|
21
|
+
Commands:
|
|
22
|
+
samples Display hash samples for the given type
|
|
23
|
+
|
|
24
|
+
Parameters:
|
|
25
|
+
<hash> Hash string to identify, read from STDIN if equal to "-"
|
|
26
|
+
<ref> hashcat or john the ripper reference
|
|
27
|
+
<name> Hash type name
|
|
28
|
+
|
|
20
29
|
Options:
|
|
21
30
|
--no-color Disable colorized output
|
|
22
31
|
-e, --extended List all possible hash algorithms including ones using salt
|
|
@@ -30,6 +39,8 @@ doc = <<~DOCOPT
|
|
|
30
39
|
Examples:
|
|
31
40
|
haiti -e d41d8cd98f00b204e9800998ecf8427e
|
|
32
41
|
haiti --no-color --short d41d8cd98f00b204e9800998ecf8427e
|
|
42
|
+
b2sum /etc/os-release | awk '{print $1}' | haiti -
|
|
43
|
+
haiti samples crc32
|
|
33
44
|
DOCOPT
|
|
34
45
|
|
|
35
46
|
begin
|
|
@@ -38,6 +49,7 @@ begin
|
|
|
38
49
|
pp args if args['--debug']
|
|
39
50
|
# use case 1, using the tool
|
|
40
51
|
if args['<hash>']
|
|
52
|
+
args['<hash>'] = $stdin.read.chomp if args['<hash>'] == '-'
|
|
41
53
|
hi = HashIdentifier.new(args['<hash>'])
|
|
42
54
|
if hi.type.empty?
|
|
43
55
|
puts 'Unknown hash type'
|
|
@@ -51,6 +63,12 @@ begin
|
|
|
51
63
|
print Paint[" [JtR: #{type.john}]", :green] unless type.john.nil? || args['--short'] || args['--hashcat-only']
|
|
52
64
|
puts
|
|
53
65
|
end
|
|
66
|
+
elsif args['samples']
|
|
67
|
+
input = args['<ref>'] || args['<name>']
|
|
68
|
+
samples = HashIdentifier.samples(input)
|
|
69
|
+
samples.each do |sample|
|
|
70
|
+
puts sample
|
|
71
|
+
end
|
|
54
72
|
end
|
|
55
73
|
# use case 2, help: already handled by docopt
|
|
56
74
|
# use case 3, version: already handled by docopt
|