Avoids duplicates in finding the same thing diffrent pages

This commit is contained in:
erwanlr
2019-11-01 15:20:46 +00:00
parent 7173cd85fe
commit 1aa242a9d8
2 changed files with 13 additions and 1 deletions

View File

@@ -34,7 +34,10 @@ module WPScan
[target.homepage_res, target.error_404_res].each do |page_res|
item = process_response(opts, page_res, slug, klass, config)
found << item if item.is_a?(Model::WpItem)
if item.is_a?(Model::WpItem)
found << item
break # No need to check the other page if detected in the current
end
end
end
end