Skip to content

Commit 5b9a4d7

Browse files
committed
Readd hostless loot display
In the chance event someone actually managed to store it.
1 parent 0723477 commit 5b9a4d7

File tree

1 file changed

+20
-0
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+20
-0
lines changed

lib/msf/ui/console/command_dispatcher/db.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,26 @@ def cmd_loot(*args)
12531253
end
12541254
end
12551255

1256+
# Handle hostless loot
1257+
if host_ranges.compact.empty? # Wasn't a host search
1258+
hostless_loot = framework.db.loots.where(host_id: nil)
1259+
hostless_loot.each do |loot|
1260+
row = []
1261+
row.push("")
1262+
row.push("")
1263+
row.push(loot.ltype)
1264+
row.push(loot.name || "")
1265+
row.push(loot.content_type)
1266+
row.push(loot.info || "")
1267+
row.push(loot.path)
1268+
tbl << row
1269+
if (mode == :delete)
1270+
loot.destroy
1271+
delete_count += 1
1272+
end
1273+
end
1274+
end
1275+
12561276
print_line
12571277
print_line(tbl.to_s)
12581278
print_status("Deleted #{delete_count} loots") if delete_count > 0

0 commit comments

Comments
 (0)