rename --key-file to --key on cli

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
Dominik Richter 2015-10-01 19:27:25 +02:00
parent fa90e71689
commit 5825b4d6d4
2 changed files with 4 additions and 1 deletions

View file

@ -55,7 +55,7 @@ class VulcanoCLI < Thor
desc: 'The login user for a remote scan.'
option :password, type: :string, default: nil,
desc: 'Login password for a remote scan, if required.'
option :key_file, type: :string, default: nil,
option :key, type: :string, default: nil,
desc: 'Login key or certificate file for a remote scan.'
option :disable_sudo, type: :boolean, default: false,
desc: 'To not run remote scans via sudo.'

View file

@ -15,6 +15,9 @@ module Vulcano
def self.target_config(config = nil)
conf = config.nil? ? {} : config.dup
key = conf['key']
conf['key_file'] = key if !key.nil? and File.file?(key)
return conf if conf['target'].to_s.empty?
uri = URI.parse(conf['target'].to_s)