From 07bb7ea4eb5c96a4bc7aac387b2e967ecae74012 Mon Sep 17 00:00:00 2001 From: Paolo Perego Date: Tue, 25 Mar 2014 09:14:48 +0100 Subject: [PATCH] Removed '-f' short option for list-known-framework --- bin/dawn | 20 ++++++++++++++++---- lib/codesake/dawn/core.rb | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/bin/dawn b/bin/dawn index 6741dfd6..a906c5eb 100755 --- a/bin/dawn +++ b/bin/dawn @@ -15,20 +15,29 @@ VALID_OUTPUT_FORMAT = %w(console json csv html) $logger = Codesake::Commons::Logging.instance opts = GetoptLong.new( + # report formatting options [ '--ascii-tabular-report', '-a', GetoptLong::NO_ARGUMENT], [ '--json', '-j', GetoptLong::NO_ARGUMENT], [ '--html', '-H', GetoptLong::NO_ARGUMENT], + + # MVC forcing [ '--rails', '-r', GetoptLong::NO_ARGUMENT], [ '--sinatra', '-s', GetoptLong::NO_ARGUMENT], [ '--padrino', '-p', GetoptLong::NO_ARGUMENT], - [ '--gem-lock', '-G', GetoptLong::REQUIRED_ARGUMENT], - [ '--list-known-framework', '-f', GetoptLong::NO_ARGUMENT], + + [ '--gem-lock', '-G', GetoptLong::REQUIRED_ARGUMENT], [ '--list-knowledgebase', '-k', GetoptLong::OPTIONAL_ARGUMENT], - [ '--verbose', '-V', GetoptLong::NO_ARGUMENT], - [ '--debug', '-D', GetoptLong::NO_ARGUMENT], [ '--count-only', '-C', GetoptLong::NO_ARGUMENT], [ '--exit-on-warn', '-z', GetoptLong::NO_ARGUMENT], + + [ '--list-known-framework', GetoptLong::NO_ARGUMENT], + [ '--list-known-families', GetoptLong::NO_ARGUMENT], + # please save output to file [ '--file', '-F', GetoptLong::REQUIRED_ARGUMENT], + + # service options + [ '--verbose', '-V', GetoptLong::NO_ARGUMENT], + [ '--debug', '-D', GetoptLong::NO_ARGUMENT], [ '--version', '-v', GetoptLong::NO_ARGUMENT], [ '--help', '-h', GetoptLong::NO_ARGUMENT] ) @@ -44,6 +53,9 @@ opts.each do |opt, val| when '--version' puts "#{Codesake::Dawn::VERSION} [#{Codesake::Dawn::CODENAME}]" Kernel.exit(0) + when '--list-known-families' + puts 'here' + Kernel.exit(0) when '--json' options[:output] = "json" when '--ascii-tabular-report' diff --git a/lib/codesake/dawn/core.rb b/lib/codesake/dawn/core.rb index 6d0b7a99..a3a726c5 100644 --- a/lib/codesake/dawn/core.rb +++ b/lib/codesake/dawn/core.rb @@ -15,7 +15,6 @@ def self.help printf "\n -p, --padrino\t\t\t\tforce dawn to consider the target a padrino application" printf "\n -G, --gem-lock\t\t\t\tforce dawn to scan only for vulnerabilities affecting dependencies in Gemfile.lock" printf "\n -D, --debug\t\t\t\t\tenters dawn debug mode" - printf "\n -f, --list-known-framework\t\t\tlist ruby MVC frameworks supported by dawn" printf "\n -k, --list-knowledgebase [check_name]\tlist dawn known security checks. If check_name is specified dawn says if check is present or not" printf "\n -a, --ascii-tabular-report\t\t\tcause dawn to format findings using table in ascii art" printf "\n -j, --json\t\t\t\t\tcause dawn to format findings using json" @@ -23,6 +22,7 @@ def self.help printf "\n -C, --count-only\t\t\t\tdawn will only count vulnerabilities (useful for scripts)" printf "\n -z, --exit-on-warn\t\t\t\tdawn will return number of found vulnerabilities as exit code" printf "\n -F, --file\t\t\t\t\ttells dawn to write output to filename" + printf "\n --list-known-framework\t\t\tlist ruby MVC frameworks supported by dawn" printf "\n -v, --version\t\t\t\tshow version information" printf "\n -h, --help\t\t\t\t\tshow this help\n"