CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/ui/common.rb
Views: 11623
1
# -*- coding: binary -*-
2
module Msf
3
module Ui
4
5
#
6
# Common functions needed by more than one user interface
7
#
8
class Common
9
10
# Process the command line argument vector, handling common global
11
# var/value pairs that can be used to control additional framework
12
# features
13
def self.process_cli_arguments(framework, argv)
14
argv.delete_if { |assign|
15
var, val = assign.split('=', 2)
16
17
next if var.nil? or val.nil?
18
19
case var.downcase
20
# Add an additional module search path
21
when "modulepath"
22
# Don't affect the module cache by us loading these modules
23
framework.modules.add_module_path(val)
24
true
25
else
26
false
27
end
28
}
29
end
30
31
end
32
33
end
34
end
35
36