Class: WpscanTasks

Inherits:
Thor
  • Object
show all
Defined in:
lib/tasks/thorfile.rb

Instance Method Summary collapse

Instance Method Details

#upload(file_path) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/tasks/thorfile.rb', line 9

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