Massive speed improvements to set PAYLOAD.
Tab completion for exploit names works for demand-loaded modules git-svn-id: file:///home/svn/framework3/trunk@3779 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
d0bc17f17a
commit
164f34cc80
|
@ -706,6 +706,21 @@ class ModuleManager < ModuleSet
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
# Provide a list of the types of modules in the set
|
||||
#
|
||||
def module_types
|
||||
module_sets.keys.dup
|
||||
end
|
||||
|
||||
#
|
||||
# Provide a list of module names of a specific type
|
||||
#
|
||||
def module_names(set)
|
||||
module_sets[set] ? module_sets[set].keys.dup : []
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
#
|
||||
|
|
|
@ -992,9 +992,14 @@ class Core
|
|||
#
|
||||
def cmd_use_tabs(str, words)
|
||||
res = []
|
||||
framework.modules.each_module { |refname, mod|
|
||||
res << mod.fullname
|
||||
}
|
||||
|
||||
framework.modules.module_types.each do |mtyp|
|
||||
mset = framework.modules.module_names(mtyp)
|
||||
mset.each do |mref|
|
||||
res << mtyp + '/' + mref
|
||||
end
|
||||
end
|
||||
|
||||
return res
|
||||
end
|
||||
|
||||
|
@ -1116,7 +1121,14 @@ class Core
|
|||
# Provide valid payload options for the current exploit
|
||||
#
|
||||
def option_values_payloads
|
||||
active_module.compatible_payloads.map { |refname, payload| refname }
|
||||
|
||||
# Module caching for significant speed improvement
|
||||
if (not (@cache_active_module and @cache_active_module == active_module.refname))
|
||||
@cache_active_module = active_module.refname
|
||||
@cache_payloads = active_module.compatible_payloads.map { |refname, payload| refname }
|
||||
end
|
||||
|
||||
@cache_payloads
|
||||
end
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue