haiti-hash 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/haiti +21 -11
- data/data/commons.json +1 -0
- data/data/prototypes.json +1151 -347
- data/docs/_media/logo.ascii +42 -0
- data/lib/haiti/version.rb +1 -1
- data/lib/haiti.rb +4 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd592c70589060103cc205f32fadb24e09c5aa21467bc43f37c9ec6c10f543df
|
4
|
+
data.tar.gz: 3062b9c1a82699502a94349404a62af27667f8456c7c6549ac7b2e00f7b5e363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0508b249173ece824297cd7fd89464b94a51d4927121cf46c71c76f5d00af92aacb5ef1dee85e5c6495ed838fb33be6cd58ebc0b6654466dc9974a31e633b47
|
7
|
+
data.tar.gz: abbaab41b018f76f45685f18c7b809c74a1e96c569c46eeccc0ec98c9ad771b7d0128c2566854b7fa51abaacef30ca490e06269553cbe87563c8c30fed9cd2f7
|
data/bin/haiti
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
# Ruby internal
|
5
|
-
require 'pp'
|
6
5
|
# Project internal
|
7
6
|
require 'haiti'
|
8
7
|
# External
|
@@ -10,43 +9,50 @@ require 'docopt'
|
|
10
9
|
require 'paint'
|
11
10
|
|
12
11
|
doc = <<~DOCOPT
|
13
|
-
HAITI (HAsh IdenTifIer) v#{HashIdentifier::VERSION}
|
12
|
+
#{Paint['HAITI (HAsh IdenTifIer)', '#FF69B4']} v#{Paint[HashIdentifier::VERSION, :bold]}
|
14
13
|
|
15
|
-
Usage:
|
14
|
+
#{Paint['Usage:', '#00FFFF']}
|
16
15
|
haiti [options] <hash>
|
17
16
|
haiti samples (<ref> | <name>)
|
17
|
+
haiti --ascii-art
|
18
18
|
haiti -h | --help
|
19
19
|
haiti --version
|
20
20
|
|
21
|
-
Commands:
|
21
|
+
#{Paint['Commands:', '#00FFFF']}
|
22
22
|
samples Display hash samples for the given type
|
23
23
|
|
24
|
-
Parameters:
|
24
|
+
#{Paint['Parameters:', '#00FFFF']}
|
25
25
|
<hash> Hash string to identify, read from STDIN if equal to "-"
|
26
26
|
<ref> hashcat or john the ripper reference
|
27
27
|
<name> Hash type name
|
28
28
|
|
29
|
-
Options:
|
30
|
-
--no-color Disable colorized output
|
29
|
+
#{Paint['Options:', '#00FFFF']}
|
30
|
+
--no-color Disable colorized output (NO_COLOR environment variable is respected too)
|
31
31
|
-e, --extended List all possible hash algorithms including ones using salt
|
32
32
|
--short Display in a short format: do not display hashcat and john the ripper references
|
33
33
|
--hashcat-only Show only hashcat references
|
34
34
|
--john-only Show only john the ripper references
|
35
|
+
--ascii-art Display the logo in colored ascii-art
|
35
36
|
--debug Display arguments
|
36
37
|
-h, --help Show this screen
|
37
38
|
--version Show version
|
38
39
|
|
39
|
-
Examples:
|
40
|
+
#{Paint['Examples:', '#00FFFF']}
|
40
41
|
haiti -e d41d8cd98f00b204e9800998ecf8427e
|
41
42
|
haiti --no-color --short d41d8cd98f00b204e9800998ecf8427e
|
42
43
|
b2sum /etc/os-release | awk '{print $1}' | haiti -
|
43
44
|
haiti samples crc32
|
45
|
+
|
46
|
+
#{Paint['Project:', '#00FFFF']}
|
47
|
+
#{Paint['author', :underline]} (https://pwn.by/noraj / https://twitter.com/noraj_rawsec)
|
48
|
+
#{Paint['source', :underline]} (https://github.com/noraj/haiti)
|
49
|
+
#{Paint['documentation', :underline]} (https://noraj.github.io/haiti)
|
44
50
|
DOCOPT
|
45
51
|
|
46
52
|
begin
|
47
53
|
args = Docopt.docopt(doc, version: HashIdentifier::VERSION)
|
48
54
|
Paint.mode = 0 if args['--no-color']
|
49
|
-
|
55
|
+
puts args if args['--debug']
|
50
56
|
# use case 1, using the tool
|
51
57
|
if args['<hash>']
|
52
58
|
args['<hash>'] = $stdin.read.chomp if args['<hash>'] == '-'
|
@@ -59,8 +65,10 @@ begin
|
|
59
65
|
next if type.extended && !args['--extended']
|
60
66
|
|
61
67
|
print Paint[type.name, :bold]
|
62
|
-
|
63
|
-
|
68
|
+
unless type.hashcat.nil? || args['--short'] || args['--john-only']
|
69
|
+
print Paint[" [HC: #{type.hashcat}]", '#00FFFF']
|
70
|
+
end
|
71
|
+
print Paint[" [JtR: #{type.john}]", '#FF69B4'] unless type.john.nil? || args['--short'] || args['--hashcat-only']
|
64
72
|
puts
|
65
73
|
end
|
66
74
|
elsif args['samples']
|
@@ -69,6 +77,8 @@ begin
|
|
69
77
|
samples.each do |sample|
|
70
78
|
puts sample
|
71
79
|
end
|
80
|
+
elsif args['--ascii-art']
|
81
|
+
puts File.read(File.join(__dir__, '../docs/_media/logo.ascii'))
|
72
82
|
end
|
73
83
|
# use case 2, help: already handled by docopt
|
74
84
|
# use case 3, version: already handled by docopt
|