haiti-hash 1.5.0 → 2.0.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.
data/lib/haiti/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Version
4
- VERSION = '1.5.0'
4
+ VERSION = '2.0.0'
5
5
  end
data/lib/haiti.rb CHANGED
@@ -50,6 +50,25 @@ class HashIdentifier
50
50
  samples.delete(nil)
51
51
  samples.flatten.uniq
52
52
  end
53
+
54
+ # List names of all hash types available
55
+ # @return [Array<String>] a list of hash types name
56
+ # @example
57
+ # HashIdentifier.list
58
+ # # => ["CRC-16", "CRC-16-CCITT", "FCS-16", "Adler-32", "CRC-32B", "FCS-32", ...]
59
+ def list
60
+ (PROTOTYPES.flat_map { |d| d['modes'].map { |m| m['name'] } }).sort { |a, b| a.downcase <=> b.downcase }.uniq
61
+ end
62
+
63
+ # List all hash types available as <Chf> object
64
+ # @return [Array<Chf>] a list of hash types object
65
+ def object_list
66
+ (PROTOTYPES.flat_map do |d|
67
+ d['modes'].map do |m|
68
+ Chf.new(m)
69
+ end
70
+ end).sort { |a, b| a.name.downcase <=> b.name.downcase }.uniq
71
+ end
53
72
  end
54
73
 
55
74
  private
data/man/haiti.1 ADDED
@@ -0,0 +1,157 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "HAITI" "1" "October 2023" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBHAITI\fR \- HAsh IdenTifIer
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBhaiti\fR \fIoptions\fR \fIhash\fR
11
+ .
12
+ .P
13
+ \fBhaiti\fR samples (\fIref\fR | \fIname\fR)
14
+ .
15
+ .P
16
+ \fBhaiti\fR \fIoptions\fR list
17
+ .
18
+ .P
19
+ \fBhaiti\fR \-\-ascii\-art
20
+ .
21
+ .P
22
+ \fBhaiti\fR \-h | \-\-help
23
+ .
24
+ .P
25
+ \fBhaiti\fR \-\-version
26
+ .
27
+ .SH "DESCRIPTION"
28
+ \fBHAITI\fR is a CLI tool and library for identifying hash types (hash type identifier)\.
29
+ .
30
+ .SH "OPTIONS"
31
+ .
32
+ .TP
33
+ \fB\-\-no\-color\fR:
34
+ .
35
+ .IP
36
+ Disable colorized output (NO_COLOR environment variable is respected too)\.
37
+ .
38
+ .TP
39
+ \fB\-e, \-\-extended\fR:
40
+ .
41
+ .IP
42
+ List all possible hash algorithms, including ones using salt\.
43
+ .
44
+ .TP
45
+ \fB\-\-short\fR:
46
+ .
47
+ .IP
48
+ Display in a short format: do not display hashcat and john the ripper references\.
49
+ .
50
+ .TP
51
+ \fB\-\-hashcat\-only\fR:
52
+ .
53
+ .IP
54
+ Show only hashcat references\.
55
+ .
56
+ .TP
57
+ \fB\-\-john\-only\fR:
58
+ .
59
+ .IP
60
+ Show only john the ripper references\.
61
+ .
62
+ .TP
63
+ \fB\-\-ascii\-art\fR:
64
+ .
65
+ .IP
66
+ Display the logo in colored ascii\-art\.
67
+ .
68
+ .TP
69
+ \fB\-\-debug\fR:
70
+ .
71
+ .IP
72
+ Display arguments\.
73
+ .
74
+ .TP
75
+ \fB\-h, \-\-help\fR:
76
+ .
77
+ .IP
78
+ Show this screen\.
79
+ .
80
+ .TP
81
+ \fB\-\-version\fR:
82
+ .
83
+ .IP
84
+ Show version\.
85
+ .
86
+ .SH "COMMANDS"
87
+ .
88
+ .TP
89
+ \fBsamples\fR:
90
+ .
91
+ .IP
92
+ Display hash samples for the given type\.
93
+ .
94
+ .TP
95
+ \fBlist\fR:
96
+ .
97
+ .IP
98
+ Display a list of all the available hash types\.
99
+ .
100
+ .SH "PARAMETERS"
101
+ .
102
+ .TP
103
+ \fB<hash>\fR:
104
+ .
105
+ .IP
106
+ Hash string to identify, read from STDIN if equal to "\-"\.
107
+ .
108
+ .TP
109
+ \fB<ref>\fR:
110
+ .
111
+ .IP
112
+ Hashcat or John the Ripper reference\.
113
+ .
114
+ .TP
115
+ \fB<name>\fR:
116
+ .
117
+ .IP
118
+ Hash type name\.
119
+ .
120
+ .SH "EXAMPLES"
121
+ \fBhaiti\fR \-e d41d8cd98f00b204e9800998ecf8427e
122
+ .
123
+ .P
124
+ \fBhaiti\fR \-\-no\-color \-\-short d41d8cd98f00b204e9800998ecf8427e
125
+ .
126
+ .P
127
+ b2sum /etc/os\-release | awk \'{print $1}\' | \fBhaiti\fR \-
128
+ .
129
+ .P
130
+ \fBhaiti\fR samples crc32
131
+ .
132
+ .SH "AUTHOR"
133
+ Made by Alexandre ZANNI (@noraj)\.
134
+ .
135
+ .P
136
+ Forked from Orange\-Cyberdefense/haiti (https://github\.com/Orange\-Cyberdefense/haiti)\.
137
+ .
138
+ .SH "COPYRIGHT"
139
+ Copyright © 2019\-2022 Alexandre ZANNI (independent)
140
+ .
141
+ .P
142
+ Copyright © 2019\-2020 Alexandre ZANNI at Orange Cyberdefense
143
+ .
144
+ .P
145
+ This software is distributed under the terms of the MIT License\. You may freely redistribute copies of it, subject to the conditions of the license\.
146
+ .
147
+ .SH "VERSION"
148
+ 2\.0\.0
149
+ .
150
+ .SH "REPORTING BUGS"
151
+ Report bugs to https://github\.com/noraj/haiti/issues\.
152
+ .
153
+ .SH "SEE ALSO"
154
+ Project homepage and documentation: https://noraj\.github\.io/haiti
155
+ .
156
+ .P
157
+ Source code: https://github\.com/noraj/haiti
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haiti-hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre ZANNI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-18 00:00:00.000000000 Z
11
+ date: 2023-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -55,6 +55,7 @@ files:
55
55
  - lib/haiti.rb
56
56
  - lib/haiti/hash.rb
57
57
  - lib/haiti/version.rb
58
+ - man/haiti.1
58
59
  homepage: https://noraj.github.io/haiti/
59
60
  licenses:
60
61
  - MIT
@@ -74,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
75
  requirements:
75
76
  - - ">="
76
77
  - !ruby/object:Gem::Version
77
- version: 2.5.0
78
+ version: 2.7.0
78
79
  - - "<"
79
80
  - !ruby/object:Gem::Version
80
81
  version: '4.0'
@@ -84,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
85
  - !ruby/object:Gem::Version
85
86
  version: '0'
86
87
  requirements: []
87
- rubygems_version: 3.4.6
88
+ rubygems_version: 3.4.10
88
89
  signing_key:
89
90
  specification_version: 4
90
91
  summary: HAsh IdenTifIer