File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
lib/msf/ui/console/command_dispatcher Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1253,6 +1253,26 @@ def cmd_loot(*args)
1253
1253
end
1254
1254
end
1255
1255
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
+
1256
1276
print_line
1257
1277
print_line ( tbl . to_s )
1258
1278
print_status ( "Deleted #{ delete_count } loots" ) if delete_count > 0
You can’t perform that action at this time.
0 commit comments