Sha256: 9343ebd794aaaec7a3f427ebf3c432dcd1db15b32f34f97150a302968458c034

Contents?: true

Size: 639 Bytes

Versions: 31

Compression:

Stored size: 639 Bytes

Contents

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

  namespace "dradis:plugins:nmap"

  desc      "upload FILE", "upload the results of an Nmap scan"
  long_desc "Upload an Nmap scan to create nodes and notes for the hosts and "\
            "ports discovered during scanning."

  def upload(file_path)
    require 'config/environment'

    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::Nmap::Importer.new(task_options)
    importer.import(file: file_path)
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
dradis-nmap-3.17.0 lib/tasks/thorfile.rb
dradis-nmap-3.16.0 lib/tasks/thorfile.rb
dradis-nmap-3.15.0 lib/tasks/thorfile.rb
dradis-nmap-3.14.0 lib/tasks/thorfile.rb
dradis-nmap-3.13.0 lib/tasks/thorfile.rb
dradis-nmap-3.12.0 lib/tasks/thorfile.rb
dradis-nmap-3.11.0 lib/tasks/thorfile.rb
dradis-nmap-3.10.0 lib/tasks/thorfile.rb
dradis-nmap-3.9.0 lib/tasks/thorfile.rb
dradis-nmap-3.8.0 lib/tasks/thorfile.rb
dradis-nmap-3.7.0 lib/tasks/thorfile.rb