Class: Ronin::Masscan::CLI::Commands::Import Private
- Inherits:
-
Ronin::Masscan::CLI::Command
- Object
- Core::CLI::Command
- Ronin::Masscan::CLI::Command
- Ronin::Masscan::CLI::Commands::Import
- Includes:
- Importable
- Defined in:
- lib/ronin/masscan/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-masscan import
command.
Usage
ronin-masscan import [options] MASSCAN_FILE
Options
--db NAME The database to connect to (Default: default)
--db-uri URI The database URI to connect to
-F binary|list|json|ndjson, Specifies the format of the scan file
--format
-h, --help Print help information
Arguments
MASSCAN_FILE The masscan scan file to import
Instance Method Summary collapse
-
#run(masscan_file) ⇒ Object
private
Runs the
ronin-masscan import
command.
Methods included from Importable
Instance Method Details
#run(masscan_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-masscan import
command.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/ronin/masscan/cli/commands/import.rb', line 72 def run(masscan_file) unless File.file?(masscan_file) print_error "no such file or directory: #{masscan_file}" exit(1) end require 'ronin/db' require 'ronin/masscan/importer' DB.connect if [:format] import_file(masscan_file, format: [:format]) else import_file(masscan_file) end end |