haiti-hash 1.3.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/bin/haiti +19 -1
- data/data/prototypes.json +1195 -192
- 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: c8666ca33015b9d177521ed2dbf2c57cf4d5d368916448acae67b0709b08e54d
|
4
|
+
data.tar.gz: 6c623a158e316ecdb438d8e470614dbd152e59620954ca697d8e74681095b0e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e668334fd140646b1a64df1ecec7353a5111d8fa9873888bbad88f8420fbeda50b08abb97ef53ac901c6bf3c0d6a87d1171df32d12b1b4869e20c5a94d9a92fc
|
7
|
+
data.tar.gz: 36eba5ecad7673002acc91d1c3230ecca973bf1257a1aa3e2932433fd1cc83ac7fc574bc132e6818c7c6e2ca84069fee03b6fae22d59d84b120e2cc712f86aeb
|
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
|