Module: Msf::DBManager::Import::BurpIssue

Included in:
Msf::DBManager::Import
Defined in:
lib/msf/core/db_manager/import/burp_issue.rb

Instance Method Summary collapse

Instance Method Details

#import_burp_issue_xml(args = {}, &block) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/msf/core/db_manager/import/burp_issue.rb', line 3

def import_burp_issue_xml(args={}, &block)
  bl = validate_ips(args[:blacklist]) ? args[:blacklist].split : []
  wspace = Msf::Util::DBManager.process_opts_workspace(args, framework).name
  parser = "Nokogiri v#{::Nokogiri::VERSION}"
  noko_args = args.dup
  noko_args[:blacklist] = bl
  noko_args[:workspace] = wspace
  if block
    yield(:parser, parser)
    doc = Rex::Parser::BurpIssueDocument.new(args,framework.db) {|type, data| yield type,data }
  else
    doc = Rex::Parser::BurpIssueDocument.new(args,self)
  end
  parser = ::Nokogiri::XML::SAX::Parser.new(doc)
  parser.parse(args[:data])
end