fix msfvenom referencing a nil typed_module_set

MS-2855/keylogger-mettle-extension
Brent Cook 2018-01-18 00:16:42 -06:00
parent 7fe237abe1
commit 86c927edb7
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 4 additions and 2 deletions

View File

@ -175,8 +175,10 @@ module Msf::ModuleManager::Cache
# Don't want to trigger as {Msf::ModuleSet#create} so check for # Don't want to trigger as {Msf::ModuleSet#create} so check for
# key instead of using ||= which would call {Msf::ModuleSet#[]} # key instead of using ||= which would call {Msf::ModuleSet#[]}
# which would potentially call {Msf::ModuleSet#create}. # which would potentially call {Msf::ModuleSet#create}.
unless typed_module_set.has_key? reference_name if typed_module_set
typed_module_set[reference_name] = Msf::SymbolicModule unless typed_module_set.has_key?(reference_name)
typed_module_set[reference_name] = Msf::SymbolicModule
end
end end
end end