Sha256: e92eac04a7dd3a7f2304ccb26c5909056422eb0a517f3045b91b7ee5e9e86f4d

Contents?: true

Size: 584 Bytes

Versions: 1

Compression:

Stored size: 584 Bytes

Contents

class NiktoTasks < Thor
  include Rails.application.config.dradis.thor_helper_module

  namespace "dradis:plugins:nikto"

  desc "upload FILE", "upload Nikto XML results"
  def upload(file_path)
    require 'config/environment'

    logger = Logger.new(STDOUT)
    logger.level = Logger::DEBUG

    unless File.exists?(file_path)
      $stderr.puts "** the file [#{file_path}] does not exist"
      exit -1
    end

    detect_and_set_project_scope

    importer = Dradis::Plugins::Nikto::Importer.new(logger: logger)
    importer.import(file: file_path)

    logger.close
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dradis-nikto-3.6.0 lib/tasks/thorfile.rb