Sha256: 01bb08ccf72be8eb00cf148f3a03cb202b1c32eff3e28006a29fdc997b1c0456

Contents?: true

Size: 775 Bytes

Versions: 25

Compression:

Stored size: 775 Bytes

Contents

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

  namespace "dradis:plugins:burp"

  desc "upload FILE", "upload Burp XML or HTML results"
  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 =
      if File.extname(file_path) == '.xml'
        Dradis::Plugins::Burp::Xml::Importer.new(task_options)
      elsif File.extname(file_path) == '.html'
        Dradis::Plugins::Burp::Html::Importer.new(task_options)
      else
        $stderr.puts "** Unsupported file. Must be .xml or .html"
        exit(-2)
      end

    importer.import(file: file_path)
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

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