Module: Ronin::Masscan::CLI::Importable Private
- Includes:
- Core::CLI::Logging, DB::CLI::Printing
- Included in:
- Commands::Import, Commands::Scan
- Defined in:
- lib/ronin/masscan/cli/importable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Mixin module which adds the ability to import masscan scan files into the ronin-db database.
Class Method Summary collapse
-
.included(command) ⇒ Object
private
Includes
Ronin::DB::CLI::DatabaseOptions
into the including command class.
Instance Method Summary collapse
-
#import_file(masscan_file, **kwargs) ⇒ Object
private
Imports an masscan scan file into the [ronin-db] database.
Class Method Details
.included(command) ⇒ 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.
Includes Ronin::DB::CLI::DatabaseOptions
into the including command
class.
46 47 48 |
# File 'lib/ronin/masscan/cli/importable.rb', line 46 def self.included(command) command.include DB::CLI::DatabaseOptions end |
Instance Method Details
#import_file(masscan_file, **kwargs) ⇒ 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.
Imports an masscan scan file into the ronin-db database.
58 59 60 61 62 63 64 |
# File 'lib/ronin/masscan/cli/importable.rb', line 58 def import_file(masscan_file,**kwargs) Importer.import_file(masscan_file,**kwargs) do |record| if (type = record_type(record)) log_info "Imported #{type}: #{record}" end end end |