Skip to content

Commit

Permalink
Implement per-target arch/platform searches SeeRM rapid7#7754
Browse files Browse the repository at this point in the history
  • Loading branch information
HD Moore committed Feb 24, 2013
1 parent 0977d1a commit 9d9d83c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/msf/core/db_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,14 @@ def module_to_details_hash(m)

m.targets.each_index do |i|
bits << [ :target, { :index => i, :name => m.targets[i].name.to_s } ]
if m.targets[i].platform
m.targets[i].platform.platforms.each do |name|
bits << [ :platform, { :name => name.to_s.split('::').last.downcase } ]
end
end
if m.targets[i].arch
bits << [ :arch, { :name => m.targets[i].arch.to_s } ]
end
end

if (m.default_target)
Expand Down Expand Up @@ -525,7 +533,7 @@ def module_to_details_hash(m)
res[:stance] = m.passive? ? "passive" : "aggressive"
end

res[:bits] = bits
res[:bits] = bits.uniq

res
end
Expand Down

0 comments on commit 9d9d83c

Please sign in to comment.