Module: Rex::Parser

Defined in:
lib/rex/parser/ini.rb,
lib/rex/parser/nmap_xml.rb,
lib/rex/parser/unattend.rb,
lib/rex/parser/arguments.rb,
lib/rex/parser/ip360_xml.rb,
lib/rex/parser/nessus_xml.rb,
lib/rex/parser/retina_xml.rb,
lib/rex/parser/ci_nokogiri.rb,
lib/rex/parser/nexpose_xml.rb,
lib/rex/parser/mbsa_nokogiri.rb,
lib/rex/parser/nmap_nokogiri.rb,
lib/rex/parser/ip360_aspl_xml.rb,
lib/rex/parser/netsparker_xml.rb,
lib/rex/parser/wapiti_nokogiri.rb,
lib/rex/parser/appscan_nokogiri.rb,
lib/rex/parser/openvas_nokogiri.rb,
lib/rex/parser/acunetix_nokogiri.rb,
lib/rex/parser/fusionvm_nokogiri.rb,
lib/rex/parser/nokogiri_doc_mixin.rb,
lib/rex/parser/nokogiri_doc_mixin.rb,
lib/rex/parser/outpost24_nokogiri.rb,
lib/rex/parser/foundstone_nokogiri.rb,
lib/rex/parser/nexpose_raw_nokogiri.rb,
lib/rex/parser/burp_session_nokogiri.rb,
lib/rex/parser/apple_backup_manifestdb.rb,
lib/rex/parser/nexpose_simple_nokogiri.rb,
lib/rex/parser/group_policy_preferences.rb

Defined Under Namespace

Classes: AppleBackupManifestDB, Arguments, GPP, IP360ASPLXMLStreamParser, IP360XMLStreamParser, Ini, NessusXMLStreamParser, NetSparkerXMLStreamParser, NexposeXMLStreamParser, NmapXMLStreamParser, RetinaXMLStreamParser, Unattend

Class Method Summary collapse

Class Method Details

.load_nokogiriObject

Determines if Nokogiri is available and if it’s a minimum acceptable version.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/rex/parser/nokogiri_doc_mixin.rb', line 7

def self.load_nokogiri
  @nokogiri_loaded = false
  begin
    require 'nokogiri'
    major,minor = Nokogiri::VERSION.split(".")[0,2]
    if major.to_i >= 1
      if minor.to_i >= 4
        @nokogiri_loaded = true
      end
    end
  rescue LoadError => e
    @nokogiri_loaded = false
    @nokogiri_error  = e
  end
  @nokogiri_loaded
end

.nokogiri_loadedObject



24
25
26
# File 'lib/rex/parser/nokogiri_doc_mixin.rb', line 24

def self.nokogiri_loaded
  !!@nokogiri_loaded
end

.reload(fname) ⇒ Object

Useful during development, shouldn’t be used in normal operation.



29
30
31
32
33
# File 'lib/rex/parser/nokogiri_doc_mixin.rb', line 29

def self.reload(fname)
  $stdout.puts "Reloading #{fname}..."
  load __FILE__
  load File.join(File.expand_path(File.dirname(__FILE__)),fname)
end