Check DB is active before querying sessions

GSoC/Meterpreter_Web_Console
Matthew Kienow 2018-09-13 15:06:53 -04:00
parent fe7a832aa8
commit 6a6d92abc1
No known key found for this signature in database
GPG Key ID: 40787F8B1EAC6E41
1 changed files with 6 additions and 4 deletions

View File

@ -620,10 +620,12 @@ class ReadableText
'Indent' => indent,
'SortIndex' => 1)
framework.db.sessions.each do |session|
unless session.closed_at.nil?
row = create_mdm_session_row(session, show_extended)
tbl << row
if framework.db.active
framework.db.sessions.each do |session|
unless session.closed_at.nil?
row = create_mdm_session_row(session, show_extended)
tbl << row
end
end
end