File List
25 | 40 | 41 |-
45 |
46 |
47 |
- 48 | 49 | 50 | 51 | 52 |
- 53 | 54 | 55 | 56 | 57 | 58 |
├── docs
├── .nojekyll
├── yard
│ ├── css
│ │ ├── common.css
│ │ ├── full_list.css
│ │ └── style.css
│ ├── frames.html
│ ├── file_list.html
│ ├── class_list.html
│ ├── top-level-namespace.html
│ ├── Version.html
│ ├── file.LICENSE.html
│ ├── index.html
│ ├── file.README.html
│ ├── _index.html
│ ├── method_list.html
│ ├── js
│ │ ├── full_list.js
│ │ └── app.js
│ ├── HashIdentifier.html
│ └── HashIdentifier
│ │ └── Chf.html
├── _navbar.md
├── _media
│ └── logo.png
├── about.md
├── pages
│ ├── demo.md
│ ├── publishing.md
│ ├── documentation.md
│ ├── quick-start.md
│ ├── usage.md
│ └── install.md
├── CHANGELOG.md
├── _sidebar.md
├── _coverpage.md
├── README.md
├── index.html
├── why.md
└── vendor
│ ├── prismjs
│ └── components
│ │ └── prism-ruby.min.js
│ ├── plugins
│ ├── search.min.js
│ └── emoji.min.js
│ ├── themes
│ └── vue.css
│ └── docsify.js
├── .ruby-version
├── .yardopts
├── .gitignore
├── .yardopts-dev
├── lib
├── haiti
│ ├── version.rb
│ └── hash.rb
└── haiti.rb
├── Gemfile
├── bin
├── haiti_console
└── haiti
├── Rakefile
├── .editorconfig
├── .rubocop.yml
├── test
└── test_haiti.rb
├── LICENSE.txt
├── Gemfile.lock
├── README.md
└── haiti.gemspec
/docs/.nojekyll:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.ruby-version:
--------------------------------------------------------------------------------
1 | 2.7.0
2 |
--------------------------------------------------------------------------------
/docs/yard/css/common.css:
--------------------------------------------------------------------------------
1 | /* Override this file with custom rules */
--------------------------------------------------------------------------------
/.yardopts:
--------------------------------------------------------------------------------
1 | --output-dir docs/yard
2 | -
3 | --main README.md
4 | LICENSE.txt
--------------------------------------------------------------------------------
/docs/_navbar.md:
--------------------------------------------------------------------------------
1 | - [Home](/)
2 | - [Source](https://github.com/Orange-Cyberdefense/haiti/)
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .yardoc
2 | *.gem
3 | /pkg
4 | /doc
5 | /vendor
6 | .bundle/
7 | /node_modules
8 | .git
9 |
--------------------------------------------------------------------------------
/docs/_media/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Orange-Cyberdefense/haiti/HEAD/docs/_media/logo.png
--------------------------------------------------------------------------------
/.yardopts-dev:
--------------------------------------------------------------------------------
1 | --output-dir docs/yard
2 | --protected
3 | --private
4 | -
5 | --main README.md
6 | LICENSE.txt
--------------------------------------------------------------------------------
/docs/about.md:
--------------------------------------------------------------------------------
1 | # About
2 |
3 | ## Logo
4 |
5 | Logo made with [DesignEvo](https://www.designevo.com).
6 |
--------------------------------------------------------------------------------
/lib/haiti/version.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module Version
4 | VERSION = '1.0.0'
5 | end
6 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | source 'https://rubygems.org'
4 |
5 | # Specify your gem's dependencies in .gemspec
6 | gemspec
7 |
--------------------------------------------------------------------------------
/bin/haiti_console:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # frozen_string_literal: true
3 |
4 | require 'haiti'
5 | require 'irb'
6 |
7 | IRB.start(__FILE__)
8 |
--------------------------------------------------------------------------------
/docs/pages/demo.md:
--------------------------------------------------------------------------------
1 | # Demonstration
2 |
3 | [](https://asciinema.org/a/rvErLcy4gudHsfMqyOMSctDXU)
4 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | require 'rake/testtask'
2 | require 'bundler/gem_tasks'
3 |
4 | Rake::TestTask.new do |t|
5 | t.libs << 'test'
6 | end
7 |
8 | desc 'Run tests'
9 | task default: :test
10 |
11 |
--------------------------------------------------------------------------------
/docs/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [Unreleased]
2 |
3 | - bin: code simplification & lint
4 |
5 | ## [1.0.0]
6 |
7 | - lib: Fix a file loading path of prototypes
8 | - doc: Fix gem name
9 | - bin: remove useless haiti_setup
10 |
11 | ## [0.0.1]
12 |
13 | - Initial version
14 |
--------------------------------------------------------------------------------
/docs/_sidebar.md:
--------------------------------------------------------------------------------
1 | - Getting started
2 |
3 | - [Quick start](pages/quick-start.md)
4 | - [Installation](pages/install.md)
5 | - [Usage](pages/usage.md)
6 | - [Demo](pages/demo.md)
7 |
8 | - Guide
9 |
10 | - [Documentation](pages/documentation.md)
11 | - [Publishing](pages/publishing.md)
12 |
13 | - [Why?](why.md)
14 | - [About](about.md)
15 | - [Changelog](CHANGELOG.md)
16 |
--------------------------------------------------------------------------------
/docs/_coverpage.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # HAITI
4 |
5 | > _**HA**sh **I**den**T**if**I**er_
6 |
7 | - 270+ hash types detected
8 | - Hashcat and John the Ripper references
9 | - CLI tool & library
10 | - Hackable
11 |
12 | [GitHub](https://github.com/Orange-Cyberdefense/haiti/)
13 | [Get Started](pages/quick-start?id=quick-start)
14 |
15 | 
16 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig: https://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | # Unix-style newlines with a newline ending every file
7 | [*]
8 | end_of_line = lf
9 | insert_final_newline = true
10 |
11 | # ruby
12 | [*.rb]
13 | charset = utf-8
14 | indent_style = space
15 | indent_size = 2
16 | trim_trailing_whitespace = true
17 |
18 | # keep source format
19 | [data/prototypes.json]
20 | indent_style = space
21 | indent_size = 4
22 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # HAITI
2 |
3 | > _**HA**sh **I**den**T**if**I**er_
4 |
5 | ## What is it?
6 |
7 | A CLI tool to identify the hash type of a given hash.
8 |
9 | ## Features
10 |
11 | - 270+ hash types detected
12 | - Hashcat and John the Ripper references
13 | - CLI tool & library
14 | - Hackable
15 |
16 | ## References
17 |
18 | Homepage / Documentation: https://orange-cyberdefense.github.io/haiti/
19 |
20 | ## Author
21 |
22 | Made by Alexandre ZANNI ([@noraj](https://github.com/noraj)), pentester from Orange Cyberdefense.
23 |
--------------------------------------------------------------------------------
/docs/yard/frames.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
83 | 84 | 85 | Modules: Version 86 | 87 | 88 | 89 | Classes: HashIdentifier 90 | 91 | 92 |
93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 |'0.0.1'
73 |75 | 76 |HAsh Iden*TifI*er
74 |
A CLI tool to identify the hash type of a given hash.
79 | 80 |Homepage / Documentation: https://orange-cyberdefense.github.io/haiti/
92 | 93 |Made by Alexandre ZANNI (@noraj), pentester from Orange Cyberdefense.
96 |
73 |75 | 76 |HAsh Iden*TifI*er
74 |
A CLI tool to identify the hash type of a given hash.
79 | 80 |Homepage / Documentation: https://orange-cyberdefense.github.io/haiti/
92 | 93 |Made by Alexandre ZANNI (@noraj), pentester from Orange Cyberdefense.
96 |
80 |
81 |
82 |
|
123 |
"+e.content+"
\n\n"}),t.classList.add("show"),a.classList.add("show"),t.innerHTML=s||''+d+"
",c.hideOtherSidebarContent&&(i.classList.add("hide"),o.classList.add("hide"))}function l(e){c=e}function r(e,n){var t,a,i,o,r=n.router.parse().query.s;l(e),Docsify.dom.style("\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n display: flex;\n align-items: center;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 0 7px;\n line-height: 36px;\n font-size: 14px;\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.search .clear-button {\n width: 36px;\n text-align: right;\n display: none;\n}\n\n.search .clear-button.show {\n display: block;\n}\n\n.search .clear-button svg {\n transform: scale(.5);\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}\n\n.app-name.hide, .sidebar-nav.hide {\n display: none;\n}"),function(e){void 0===e&&(e="");var n='The global Hash Identifier class
113 | 114 | 115 |122 | 123 | 124 | 125 | 126 | Classes: Chf 127 | 128 | 129 |
130 | 131 | 132 |JSON.parse(File.read(File.join(__dir__, '../data/prototypes.json')))
The hash (as provided).
183 |List of Chf objects, representing the identified hashes.
212 |A new instance of hash identifier.
251 |A new instance of hash identifier
281 | 282 | 283 |
311 | 312 | 313 | 314 | 26 315 | 27 316 | 28 317 | 29318 | |
319 |
320 | # File 'lib/haiti.rb', line 26 321 | 322 | def initialize(hash) 323 | @hash = hash 324 | @type = identify(hash) 325 | end326 | |
327 |
Returns the hash (as provided)
351 | 352 | 353 |
387 | 388 | 389 | 390 | 18 391 | 19 392 | 20393 | |
394 |
395 | # File 'lib/haiti.rb', line 18 396 | 397 | def hash 398 | @hash 399 | end400 | |
401 |
Returns list of Chf objects, representing the identified hashes
420 | 421 | 422 |
448 | 449 | 450 | 451 | 22 452 | 23 453 | 24454 | |
455 |
456 | # File 'lib/haiti.rb', line 22 457 | 458 | def type 459 | @type 460 | end461 | |
462 |
Cryptographic hash function object
106 | 107 | 108 |Display by default or not.
144 |Hashcat hash ID.
173 |John the Ripper hash reference.
202 |Name of the identified hash type.
231 |A new instance of Chf.
270 |Returns a new instance of Chf
294 | 295 | 296 |
304 | 305 | 306 | 307 | 16 308 | 17 309 | 18 310 | 19 311 | 20 312 | 21313 | |
314 |
315 | # File 'lib/haiti/hash.rb', line 16 316 | 317 | def initialize(mode) 318 | @name = mode['name'] 319 | @john = mode['john'] 320 | @hashcat = mode['hashcat'] 321 | @extended = mode['extended'] 322 | end323 | |
324 |
Returns Display by default or not. If true it is displayed in extended mode only, mostly hash type using salt.
348 | 349 | 350 |
376 | 377 | 378 | 379 | 14 380 | 15 381 | 16382 | |
383 |
384 | # File 'lib/haiti/hash.rb', line 14 385 | 386 | def extended 387 | @extended 388 | end389 | |
390 |
Returns Hashcat hash ID. nil if unknown.
409 | 410 | 411 |
437 | 438 | 439 | 440 | 11 441 | 12 442 | 13443 | |
444 |
445 | # File 'lib/haiti/hash.rb', line 11 446 | 447 | def hashcat 448 | @hashcat 449 | end450 | |
451 |
Returns John the Ripper hash reference. nil if unknown.
470 | 471 | 472 |
498 | 499 | 500 | 501 | 9 502 | 10 503 | 11504 | |
505 |
506 | # File 'lib/haiti/hash.rb', line 9 507 | 508 | def john 509 | @john 510 | end511 | |
512 |
Returns name of the identified hash type
531 | 532 | 533 |
559 | 560 | 561 | 562 | 7 563 | 8 564 | 9565 | |
566 |
567 | # File 'lib/haiti/hash.rb', line 7 568 | 569 | def name 570 | @name 571 | end572 | |
573 |
"+e+""},r.prototype.br=function(){return this.options.xhtml?""+p(e.message+"",!0)+"";throw e}}d.exec=d,f.options=f.setOptions=function(e){return g(f.defaults,e),f},f.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},f.defaults=f.getDefaults(),f.Parser=u,f.parser=u.parse,f.Renderer=r,f.TextRenderer=i,f.Lexer=l,f.lexer=l.lex,f.InlineLexer=c,f.inlineLexer=c.output,f.parse=f,m.exports=f}(t||"undefined"!=typeof window&&window)}),a=i(function(e){var c="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},u=function(){var l=/\blang(?:uage)?-([\w-]+)\b/i,t=0,P=c.Prism={manual:c.Prism&&c.Prism.manual,disableWorkerMessageHandler:c.Prism&&c.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof o?new o(e.type,P.util.encode(e.content),e.alias):"Array"===P.util.type(e)?e.map(P.util.encode):e.replace(/&/g,"&").replace(/