hashdata 0.0.1
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/.gitignore +20 -0
- data/Gemfile +3 -0
- data/LICENSE +20 -0
- data/README.md +57 -0
- data/Rakefile +1 -0
- data/bin/hashdata +19 -0
- data/hashdata.gemspec +21 -0
- data/lib/hashdata.rb +47 -0
- data/screenshot.png +0 -0
- metadata +88 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Sam Brown
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# HashData
|
2
|
+
A REPL for hashing, encoding, and encryption identification. The listings aren't complete and will generally give numerous possibilities for each input due to the nature of a lot of functions having output in a similar format.
|
3
|
+
|
4
|
+

|
5
|
+
|
6
|
+
## Usage
|
7
|
+
```bash
|
8
|
+
$ gem install hashdata
|
9
|
+
```
|
10
|
+
|
11
|
+
When installed, run `hashdata` and paste in hashes when prompted.
|
12
|
+
|
13
|
+
## Supports
|
14
|
+
- Adler32
|
15
|
+
- Blowfish(Eggdrop), Blowfish(OpenBSD)
|
16
|
+
- CRC-16, CRC-16-CCITT
|
17
|
+
- CRC-32, CRC-32B
|
18
|
+
- CRC-96(ZIP)
|
19
|
+
- Domain Cached Credentials, Domain Cached Credentials 2
|
20
|
+
- DES(Unix), DES(Oracle)
|
21
|
+
- FCS-16, FCS-32
|
22
|
+
- FNV-132, FNV-164
|
23
|
+
- GOST R 34.11-94
|
24
|
+
- GHash-32-3, GHash-32-5
|
25
|
+
- Haval-128, Haval-160, Haval-192, Haval-224, Haval-256
|
26
|
+
- Joaat
|
27
|
+
- Lineage II C4
|
28
|
+
- LM
|
29
|
+
- Lotus Domino
|
30
|
+
- MD2, MD4, MD5
|
31
|
+
- MD5(Joomla), MD5(osCommerce), MD5(PalshopCMS)
|
32
|
+
- MD5(APR), MD5(Cisco PIX), MD5(Unix)
|
33
|
+
- MD5(IP.Board), MD5(MyBB), MD5(phpBB3), MD5(WordPress)
|
34
|
+
- MySQL3.x, MySQL4.x, MySQL5.x
|
35
|
+
- MSSQL(2000), MSSQL(2005), MSSQL(2008)
|
36
|
+
- NTLM
|
37
|
+
- RAdmin v2.x
|
38
|
+
- RIPEMD-128, RIPEMD-160, RIPEMD-256, RIPEMD-320
|
39
|
+
- SAM(LM_Hash:NT_Hash)
|
40
|
+
- SHA-1, SHA-1(Django), SHA-1(MaNGOS), SHA-1(MaNGOS2)
|
41
|
+
- SHA-224
|
42
|
+
- SHA-256, SHA-256(Django), SHA-256(Unix)
|
43
|
+
- SHA3-224, SHA3-256, SHA3-384, SHA3-512
|
44
|
+
- SHA-384, SHA-384(Django)
|
45
|
+
- SHA-512, SHA-512(Drupal), SHA-512(Unix)
|
46
|
+
- SSHA-1
|
47
|
+
- Skein-256, Skein-256(128), Skein-256(160), Skein-256(224)
|
48
|
+
- Skein-512, Skein-512(128), Skein-512(160), Skein-512(224), Skein-512(256), Skein-512(384)
|
49
|
+
- Skein-1024, Skein-1024(384), Skein-1024(512)
|
50
|
+
- Snefru-128, Snefru-256
|
51
|
+
- Tiger-128, Tiger-160, Tiger-192
|
52
|
+
- VNC
|
53
|
+
- Whirlpool
|
54
|
+
- XOR-32
|
55
|
+
|
56
|
+
## Development
|
57
|
+
Development is on going and new hashes are added sporadically and when requested and errors are fixed whenever reported.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/bin/hashdata
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift(File.dirname(File.realpath(__FILE__)) + '/../lib')
|
5
|
+
require 'hashdata'
|
6
|
+
|
7
|
+
puts 'Use Ctrl+C to exit program.'
|
8
|
+
hash = HashChecker.new
|
9
|
+
|
10
|
+
loop do
|
11
|
+
print('Enter your Hash: ')
|
12
|
+
trap('SIGINT') do
|
13
|
+
puts("\n")
|
14
|
+
exit
|
15
|
+
end
|
16
|
+
out = hash.check(gets.chomp)
|
17
|
+
out.empty? ? puts("\e[31m#{'No hash matches found!'}\e[0m") : puts("\e[32m#{out}\e[0m")
|
18
|
+
puts
|
19
|
+
end
|
data/hashdata.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'hashdata'
|
7
|
+
spec.version = '0.0.1'
|
8
|
+
spec.authors = ['Sam Brown']
|
9
|
+
spec.email = ['samdanielbrown@gmail.com']
|
10
|
+
spec.summary = %q{A command line Hash Identifying tool.}
|
11
|
+
spec.homepage = 'https://github.com/sam-b/HashData'
|
12
|
+
spec.license = 'MIT'
|
13
|
+
|
14
|
+
spec.files = `git ls-files -z`.split("\x0")
|
15
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
|
19
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
20
|
+
spec.add_development_dependency 'rake', '~> 10.1'
|
21
|
+
end
|
data/lib/hashdata.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
class HashChecker
|
2
|
+
PATTERNS = [
|
3
|
+
[/^[a-f0-9]{4}$/, 'CRC-16, CRC-16-CCITT, FCS-16'],
|
4
|
+
[/^[a-f0-9]{8}$/, 'Adler32, CRC-32, CRC-32B, FCS-32, GHash-32-3, GHash-32-5, XOR-32, FNV-132, Joaat'],
|
5
|
+
[/^\+[a-z0-9\/\.]{12}$/, 'Blowfish(Eggdrop)'],
|
6
|
+
[/^.{0,2}[a-z0-9\/\.]{11}$/, 'DES(Unix)'],
|
7
|
+
[/^[a-f0-9]{16}$/, 'MySQL3.x, LM, DES(Oracle), VNC, FNV-164'],
|
8
|
+
[/^[a-z0-9\/\.]{16}$/, 'MD5(Cisco PIX)'],
|
9
|
+
[/^\$1\$.{0,8}\$[a-z0-9\/\.]{22}$/, 'MD5(Unix)'],
|
10
|
+
[/^\$apr1\$.{0,8}\$[a-z0-9\/\.]{22}$/, 'MD5(APR)'],
|
11
|
+
[/^[a-f0-9]{24}$/, 'CRC-96(ZIP)'],
|
12
|
+
[/^\$H\$[a-z0-9\/\.]{31}$/, 'MD5(phpBB3)'],
|
13
|
+
[/^\$P\$[a-z0-9\/\.]{31}$/, 'MD5(Wordpress)'],
|
14
|
+
[/^[0-9a-f]{32}$/, 'MD5, NTLM, Domain Cached Credentials, Domain Cached Credentials 2, RAdminv2.x, MD4, MD2,RIPEMD-128, Haval-128, Tiger-128, Snefru-128, Skein-256(128), Skein-512(128)'],
|
15
|
+
[/^0x[a-f0-9]{32}$/, 'Lineage II C4'],
|
16
|
+
[/^[a-f0-9]{32}:[a-z0-9]{16,32}$/, 'MD5(Joomla)'],
|
17
|
+
[/^[a-f0-9]{32}:.{5}$/, 'MD5(IP.Board)'],
|
18
|
+
[/^[a-f0-9]{32}:[a-z0-9]{8}$/, 'MD5(MyBB)'],
|
19
|
+
[/^[a-f0-9]{40}$/, 'SHA-1, MySQL4.x, RIPEMD-160, Haval-160, SHA-1(MaNGOS), SHA-1(MaNGOS2), Tiger-160, Skein-256(160), Skein-512(160)'],
|
20
|
+
[/^\*[a-f0-9]{40}$/, 'MySQL5.x'],
|
21
|
+
[/^sha1\$.{0,32}\$[a-f0-9]{40}$/, 'SHA-1(Django)'],
|
22
|
+
[/^0x0100[a-f0-9]{0,8}?[a-f0-9]{40}$/, 'MSSQL(2005), MSSQL(2008)'],
|
23
|
+
[/^[a-f0-9]{48}$/, 'Haval-192, Tiger-192'],
|
24
|
+
[/^[a-f0-9]{51}$/, 'MD5(Palshop)'],
|
25
|
+
[/^\$S\$[a-z0-9\/\.]{52}$/, 'SHA-512(Drupal)'],
|
26
|
+
[/^\$2a\$[0-9]{0,2}?\$[a-z0-9\/\.]{53}$/, 'Blowfish(OpenBSD)'],
|
27
|
+
[/^[a-f0-9]{56}$/, 'SHA-224, Haval-224, Keccak-224, Skein-256(224), Skein-512(224)'],
|
28
|
+
[/^[a-f0-9]{64}$/, 'SHA-256, RIPEMD-256, Haval-256, Snefru-256, GOST R 34.11-94, Keccak-256, Skein-256,Skein-512(256)'],
|
29
|
+
[/^sha256\$.{0,32}\$[a-f0-9]{64}$/, 'SHA-256(Django)'],
|
30
|
+
[/^\$5\$.{0,22}\$[a-z0-9\/\.]{43,69}$/, 'SHA-256(Unix)'],
|
31
|
+
[/^[a-f0-9]{80}$/, 'RIPEMD-320'],
|
32
|
+
[/^0x0100[a-f0-9]{0,8}?[a-f0-9]{80}$/, 'MSSQL(2000)'],
|
33
|
+
[/^\$6\$.{0,22}\$[a-z0-9\/\.]{86}$/, 'SHA-512(Unix)'],
|
34
|
+
[/^[a-f0-9]{96}$/, 'SHA-384, SHA3-384, Skein-512(384), Skein-1024(384)'],
|
35
|
+
[/^sha384\$.{0,32}\$[a-f0-9]{96}$/, 'SHA-384(Django)'],
|
36
|
+
[/^[a-f0-9]{128}$/, 'SHA-512, Whirlpool, SHA3-512, Skein-512, Skein-1024(512)'],
|
37
|
+
[/^[a-f0-9]{256}$/, 'Skein-1024'],
|
38
|
+
[/^({SSHA})?[a-z0-9\+\/]{32,38}?(==)?$/, 'SSHA-1'],
|
39
|
+
[/^\(?[a-z0-9\+\/]{20}\)?$/, 'Lotus Domino'],
|
40
|
+
[/^[a-f0-9]{32}:[a-z0-9]{2}$/, 'MD5(osCommerce)'],
|
41
|
+
[/^[a-f0-9]{32}:[a-f0-9]{32}$/, 'SAM(LM_Hash:NT_Hash)']
|
42
|
+
].freeze
|
43
|
+
|
44
|
+
def check(input)
|
45
|
+
PATTERNS.map { |i| i[1] if i[0].match(input) }.compact.uniq.join(', ')
|
46
|
+
end
|
47
|
+
end
|
data/screenshot.png
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hashdata
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Sam Brown
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-02-10 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.5'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.5'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '10.1'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '10.1'
|
46
|
+
description:
|
47
|
+
email:
|
48
|
+
- samdanielbrown@gmail.com
|
49
|
+
executables:
|
50
|
+
- hashdata
|
51
|
+
extensions: []
|
52
|
+
extra_rdoc_files: []
|
53
|
+
files:
|
54
|
+
- .gitignore
|
55
|
+
- Gemfile
|
56
|
+
- LICENSE
|
57
|
+
- README.md
|
58
|
+
- Rakefile
|
59
|
+
- bin/hashdata
|
60
|
+
- hashdata.gemspec
|
61
|
+
- lib/hashdata.rb
|
62
|
+
- screenshot.png
|
63
|
+
homepage: https://github.com/sam-b/HashData
|
64
|
+
licenses:
|
65
|
+
- MIT
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
78
|
+
requirements:
|
79
|
+
- - ! '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubyforge_project:
|
84
|
+
rubygems_version: 1.8.23
|
85
|
+
signing_key:
|
86
|
+
specification_version: 3
|
87
|
+
summary: A command line Hash Identifying tool.
|
88
|
+
test_files: []
|