Class: Ronin::Nmap::CLI::Commands::Import Private
- Inherits:
-
Ronin::Nmap::CLI::Command
- Object
- Core::CLI::Command
- Ronin::Nmap::CLI::Command
- Ronin::Nmap::CLI::Commands::Import
- Includes:
- Importable
- Defined in:
- lib/ronin/nmap/cli/commands/import.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The ronin-nmap import
command.
Usage
ronin-nmap import [options] XML_FILE
Options
--db NAME The database to connect to (Default: default)
--db-uri URI The database URI to connect to
-h, --help Print help information
Arguments
XML_FILE The XML file to import
Instance Method Summary collapse
-
#run(xml_file) ⇒ Object
private
Runs the
ronin-nmap import
command.
Methods included from Importable
Instance Method Details
#run(xml_file) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Runs the ronin-nmap import
command.
65 66 67 68 69 70 71 72 73 |
# File 'lib/ronin/nmap/cli/commands/import.rb', line 65 def run(xml_file) unless File.file?(xml_file) print_error "no such file or directory: #{xml_file}" exit(1) end db_connect import_file(xml_file) end |