File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
lib/msf/ui/console/command_dispatcher Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1235,15 +1235,18 @@ def cmd_loot(*args)
1235
1235
end
1236
1236
1237
1237
loots . each do |loot |
1238
- next if types and types . index ( loot . ltype ) . nil?
1239
1238
row = [ ]
1240
1239
# TODO: This is just a temp implementation of update for the time being since it did not exist before.
1241
1240
# It should be updated to not pass all of the attributes attached to the object, only the ones being updated.
1242
1241
if mode == :update
1243
1242
begin
1244
1243
loot . info = info if info
1245
1244
loot . filename = filename if filename
1246
- loot . ltype = types if types
1245
+ if types . size > 1
1246
+ print_error "May only pass 1 type when performing an update."
1247
+ next
1248
+ end
1249
+ loot . ltype = types . first if types
1247
1250
framework . db . update_loot ( loot . as_json . symbolize_keys )
1248
1251
rescue Exception => e
1249
1252
elog "There was an error updating loot with ID #{ loot . id } : #{ e . message } "
You can’t perform that action at this time.
0 commit comments