Class: Msf::Ui::Common

Inherits:
Object
  • Object
show all
Defined in:
lib/msf/ui/common.rb

Overview

Common functions needed by more than one user interface

Class Method Summary collapse

Class Method Details

.process_cli_arguments(framework, argv) ⇒ Object

Process the command line argument vector, handling common global var/value pairs that can be used to control additional framework features



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/msf/ui/common.rb', line 13

def self.process_cli_arguments(framework, argv)
  argv.delete_if { |assign|
    var, val = assign.split('=', 2)

    next if var.nil? or val.nil?

    case var.downcase
      # Add an additional module search path
      when "modulepath"
        # Don't affect the module cache by us loading these modules
        framework.modules.add_module_path(val)
        true
      else
        false
    end
  }
end