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
|
||||||
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
|
protected
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -992,9 +992,14 @@ class Core
|
||||||
#
|
#
|
||||||
def cmd_use_tabs(str, words)
|
def cmd_use_tabs(str, words)
|
||||||
res = []
|
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
|
return res
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1116,7 +1121,14 @@ class Core
|
||||||
# Provide valid payload options for the current exploit
|
# Provide valid payload options for the current exploit
|
||||||
#
|
#
|
||||||
def option_values_payloads
|
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
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue