Fix #208 - Fixed vulnerable plugins still appear in the results
This commit is contained in:
@@ -35,7 +35,9 @@ class WpItems < Array
|
||||
|
||||
if target_item.exists?(exist_options, response)
|
||||
if !results.include?(target_item)
|
||||
results << target_item
|
||||
if !options[:only_vulnerable] || options[:only_vulnerable] && target_item.vulnerable?
|
||||
results << target_item
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,6 +21,10 @@ class WpItem
|
||||
vulnerabilities
|
||||
end
|
||||
|
||||
def vulnerable?
|
||||
vulnerabilities.empty? ? false : true
|
||||
end
|
||||
|
||||
# Checks if a item is vulnerable to a specific vulnerability
|
||||
#
|
||||
# @param [ Vulnerability ] vuln Vulnerability to check the item against
|
||||
|
||||
Reference in New Issue
Block a user