Skip to content

Commit bac3c80

Browse files
committed
Land 5093, workaround for when cache is being built
2 parents 890b151 + 83cf1ad commit bac3c80

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/msf/core/db_manager/session.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ def infer_vuln_from_session(session, wspace)
125125
mod_fullname = session.via_exploit
126126
end
127127
mod_detail = ::Mdm::Module::Detail.find_by_fullname(mod_fullname)
128+
if mod_detail.nil?
129+
# Then the cache isn't built yet, take the hit for instantiating the
130+
# module
131+
mod_detail = framework.modules.create(mod_fullname)
132+
end
128133
mod_name = mod_detail.name
129134

130135
vuln_info = {

0 commit comments

Comments
 (0)