hashcheck 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9db5315db3d01c96d3add0b53a421869afb4784cc0486d926e4f3731c2aeff3f
4
- data.tar.gz: f6391ea245fd5f559b0fc96361b0cb9dc46724daba7df0521076a6224631f8b3
3
+ metadata.gz: 48087b576077f143f956e469ec5fb358fe43d175b086cd2e9dbc3ce00fef1b59
4
+ data.tar.gz: 1925625027e8c93babf57d5d35e20d811deb57ce3266656a4d154f78fea83a76
5
5
  SHA512:
6
- metadata.gz: 1e95071056fee00533654d458820b66a85cda063f81f4f283312f4a883d3dd6b1129af2ceea04569f80a0d3f9789c77bf31b13ccf6db6a05402edb0d2f02e452
7
- data.tar.gz: ea54ba40e1ac519ba4fbd6863ce4656a59e609bd57a8e88df437824bb29201824959030f006534f6d0226e8d0b40ce04cd9bdde953ce0e7f04ef8ddbb312defa
6
+ metadata.gz: 9de4ffdbc90023f6b421de6c182c8ea718fbf1384cbad6bd576a519786f2712e72f3620879b27fc567fc994061f00bb80cec66eed5bec37ce1b17012fcb0c662
7
+ data.tar.gz: 51a9df10c3377ab6275ad11e9ddab967b7d862d9e203e7d465b5b159e22e3d02cf5860e9cc38feb2e4d7da4105bb4ead049d0caf8c557af850ed79edb37eb35b
data/bin/hashcheck ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby
2
+ require 'bundler/setup'
3
+ require "hashcheck"
4
+
5
+ require 'optionparser'
6
+ options = {}
7
+ printers = Array.new
8
+
9
+ OptionParser.new do |opts|
10
+ opts.banner = "Usage: hashcheck -e [value] \nDefaults: hashcheck -e hash_value"
11
+ opts.on("-e", "--hash Hash value", String, "Input hash value") do |value|
12
+ options[:value] = value
13
+ end
14
+ opts.on("-s", "--salt Salt", "Prints salt and hash type") do |s|
15
+ options[:salt] = True
16
+ end
17
+ end.parse!
18
+
19
+ if options[:value].nil?
20
+ print("Please enter the hash: \n")
21
+ options[:value]=gets.chomp! unless gets.chomp.empty?
22
+ end
23
+
24
+ print "\n"
25
+
26
+ ' ___ ___ .__ _________ .__ __ '
27
+ ' / | \_____ _____| |__ \_ ___ \| |__ ____ ____ | | __'
28
+ '/ ~ \__ \ / ___/ | \/ \ \/| | \_/ __ \_/ ___\| |/ /'
29
+ '\ Y // __ \_\___ \| Y \ \___| Y \ ___/\ \___| < '
30
+ ' \___|_ /(____ /____ >___| /\______ /___| /\___ >\___ >__|_ \ '
31
+
32
+
33
+
34
+ c = Hashcheck::Check.new(options[:value])
35
+ print "Type \t #{c.hash_type} \n"
36
+ print "Value \t #{c.value} \n"
37
+ print "Algorithm \t #{c.name} \n"
38
+ print "Hash \t #{c.hash} \n"
39
+ print "Salt \t #{c.salt} \n"
data/hashcheck.gemspec CHANGED
@@ -24,8 +24,9 @@ Gem::Specification.new do |spec|
24
24
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
25
25
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
26
  end
27
- spec.bindir = "exe"
28
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.bindir = "bin"
28
+ #spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
+ spec.executables << 'hashcheck'
29
30
  spec.require_paths = ["lib"]
30
31
 
31
32
  spec.add_development_dependency "bundler", "~> 2.0"
@@ -1,3 +1,3 @@
1
1
  module Hashcheck
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashcheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akhil
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2019-10-14 00:00:00.000000000 Z
12
12
  dependencies:
@@ -55,7 +55,8 @@ dependencies:
55
55
  description: Check and returns the kind of algorithm used for hashing
56
56
  email:
57
57
  - akhilesh.sharma@imaginea.com
58
- executables: []
58
+ executables:
59
+ - hashcheck
59
60
  extensions: []
60
61
  extra_rdoc_files: []
61
62
  files:
@@ -68,6 +69,7 @@ files:
68
69
  - README.md
69
70
  - Rakefile
70
71
  - bin/console
72
+ - bin/hashcheck
71
73
  - bin/setup
72
74
  - hashcheck.gemspec
73
75
  - lib/hashcheck.rb