bin/ssh_scan in ssh_scan-0.0.14 vs bin/ssh_scan in ssh_scan-0.0.15

- old
+ new

@@ -16,10 +16,11 @@ :unit_test => false, :timeout => 2, :threads => 5, :verbosity => nil, :logger => Logger.new(STDERR), + :fingerprint_database => "./fingerprints.db" } target_parser = SSHScan::TargetParser.new() opt_parser = OptionParser.new do |opts| @@ -105,17 +106,22 @@ opts.on("--threads [NUMBER]", "Number of worker threads (Default: 5)") do |threads| options[:threads] = threads.to_i end + opts.on("--fingerprint-db [FILE]", + "File location of fingerprint database (Default: ./fingerprints.db)") do |fingerprint_db| + options[:fingerprint_database] = fingerprint_db + end + opts.on("-u", "--unit-test [FILE]", "Throw appropriate exit codes based on compliance status") do options[:unit_test] = true end opts.on("-V", "--verbosity", - "Set the logger level (Accpeted Params: INFO, DEBUG, WARN, ERROR, FATAL)") do |verbosity| + "Set the logger level (Accepted Params: INFO, DEBUG, WARN, ERROR, FATAL)") do |verbosity| options[:logger].level = case options[:verbosity] when "INFO" then Logger::INFO when "DEBUG" then Logger::DEBUG when "WARN" then Logger::WARN when "ERROR" then Logger::ERROR @@ -179,9 +185,17 @@ unless File.exists?(options[:policy]) puts opt_parser.help puts "\nReason: policy file supplied is not a file" exit 1 +end + +# Check to see if we're running the latest released version +update = SSHScan::Update.new +if update.newer_gem_available? + options[:logger].warn("You're NOT using the latest version of ssh_scan, try 'gem update ssh_scan' to get the latest") +else + options[:logger].info("You're using the latest version of ssh_scan #{SSHScan::VERSION}") end options[:policy_file] = SSHScan::Policy.from_file(options[:policy]) # Perform scan and get results