Module: Msf::DBManager::Import::IP360::ASPL
- Included in:
- Msf::DBManager::Import::IP360
- Defined in:
- lib/msf/core/db_manager/import/ip360/aspl.rb
Instance Method Summary collapse
-
#import_ip360_aspl_xml(args = {}) {|:notice, "Saved the IP360 ASPL database to #{base}..."| ... } ⇒ Object
Import IP360’s ASPL database.
Instance Method Details
#import_ip360_aspl_xml(args = {}) {|:notice, "Saved the IP360 ASPL database to #{base}..."| ... } ⇒ Object
Import IP360’s ASPL database
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/msf/core/db_manager/import/ip360/aspl.rb', line 6 def import_ip360_aspl_xml(args={}, &block) data = args[:data] if not data.index("<ontology") raise Msf::DBImportError.new("The ASPL file does not appear to be valid or may still be compressed") end base = ::File.join(Msf::Config.config_directory, "data", "ncircle") ::FileUtils.mkdir_p(base) ::File.open(::File.join(base, "ip360.aspl"), "wb") do |fd| fd.write(data) end yield(:notice, "Saved the IP360 ASPL database to #{base}...") end |