Sha256: 9343ebd794aaaec7a3f427ebf3c432dcd1db15b32f34f97150a302968458c034

Contents?: true

Size: 639 Bytes

Versions: 30

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

30 entries across 30 versions & 1 rubygems

Version Path
dradis-nmap-4.14.0 lib/tasks/thorfile.rb
dradis-nmap-4.13.0 lib/tasks/thorfile.rb
dradis-nmap-4.11.0 lib/tasks/thorfile.rb
dradis-nmap-4.10.0 lib/tasks/thorfile.rb
dradis-nmap-4.9.0 lib/tasks/thorfile.rb
dradis-nmap-4.8.0 lib/tasks/thorfile.rb
dradis-nmap-4.7.0 lib/tasks/thorfile.rb
dradis-nmap-4.6.0 lib/tasks/thorfile.rb
dradis-nmap-4.5.0 lib/tasks/thorfile.rb
dradis-nmap-4.4.0 lib/tasks/thorfile.rb
dradis-nmap-4.3.0 lib/tasks/thorfile.rb
dradis-nmap-4.2.0 lib/tasks/thorfile.rb
dradis-nmap-4.1.0 lib/tasks/thorfile.rb
dradis-nmap-4.0.0 lib/tasks/thorfile.rb
dradis-nmap-3.22.0 lib/tasks/thorfile.rb
dradis-nmap-3.21.0 lib/tasks/thorfile.rb
dradis-nmap-3.20.0 lib/tasks/thorfile.rb
dradis-nmap-3.19.0 lib/tasks/thorfile.rb
dradis-nmap-3.18.0 lib/tasks/thorfile.rb
dradis-nmap-3.17.0 lib/tasks/thorfile.rb