Sha256: bf255aac57b5d999d07119572164d6e3a3138877243e04f79a7f2527d7881f69
Contents?: true
Size: 1.12 KB
Versions: 3
Compression:
Stored size: 1.12 KB
Contents
#!/usr/bin/env ruby require 'bundler/setup' require "hashcheck" require 'optionparser' options = {} printers = Array.new OptionParser.new do |opts| opts.banner = "Usage: hashcheck -e [value] \nDefaults: hashcheck -e hash_value" opts.on("-e", "--hash Hash value", String, "Input hash value") do |value| options[:value] = value end opts.on("-s", "--salt Salt", "Prints salt and hash type") do |s| options[:salt] = True end end.parse! if options[:value].nil? print("Please enter the hash: \n") options[:value]=gets.chomp! unless gets.chomp.empty? end print "\n" ' ___ ___ .__ _________ .__ __ ' ' / | \_____ _____| |__ \_ ___ \| |__ ____ ____ | | __' '/ ~ \__ \ / ___/ | \/ \ \/| | \_/ __ \_/ ___\| |/ /' '\ Y // __ \_\___ \| Y \ \___| Y \ ___/\ \___| < ' ' \___|_ /(____ /____ >___| /\______ /___| /\___ >\___ >__|_ \ ' c = Hashcheck::Check.new(options[:value]) print "Type \t #{c.hash_type} \n" print "Value \t #{c.value} \n" print "Algorithm \t #{c.name} \n" print "Hash \t #{c.hash} \n" print "Salt \t #{c.salt} \n"
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hashcheck-0.1.3 | bin/hashcheck |
hashcheck-0.1.2 | bin/hashcheck |
hashcheck-0.1.1 | bin/hashcheck |