MSFConsole should display hostless loot, also typo fix.
Fixes the console to display loot not associated with a host, as when the CorpWatch modules save loot. Also fixes a typo on corpwatch_lookup_id.rb Fixes #6177
This commit is contained in:
parent
78da15ed15
commit
bc22b7de99
|
@ -948,6 +948,27 @@ class Db
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Handle hostless loot
|
||||
if host_ranges.compact.empty? # Wasn't a host search
|
||||
hostless_loot = framework.db.loots.find_all_by_host_id(nil)
|
||||
hostless_loot.each do |loot|
|
||||
row = []
|
||||
row.push("")
|
||||
row.push("")
|
||||
row.push(loot.ltype)
|
||||
row.push(loot.name || "")
|
||||
row.push(loot.content_type)
|
||||
row.push(loot.info || "")
|
||||
row.push(loot.path)
|
||||
tbl << row
|
||||
if (mode == :delete)
|
||||
loot.destroy
|
||||
delete_count += 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
print_line
|
||||
print_line tbl.to_s
|
||||
print_status "Deleted #{delete_count} loots" if delete_count > 0
|
||||
|
|
|
@ -520,7 +520,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
end
|
||||
end
|
||||
|
||||
p = store_loot("corpwatch_api.#{datastore['CW_ID']}_info","text/plain",nil,loot,"company_#{datastore['CWID']}.txt","#{datastore["CW_ID"]} Specific Information")
|
||||
p = store_loot("corpwatch_api.#{datastore['CW_ID']}_info","text/plain",nil,loot,"company_#{datastore['CW_ID']}.txt","#{datastore["CW_ID"]} Specific Information")
|
||||
|
||||
print_line()
|
||||
print_status("Saved in: #{p}")
|
||||
|
|
Loading…
Reference in New Issue