Merge branch 'master' into 3.7.0-merged-master

This commit is contained in:
erwanlr
2019-09-05 19:46:16 +01:00
22 changed files with 2667 additions and 45 deletions

View File

@@ -4,7 +4,7 @@ module WPScan
module Finders
module DynamicFinder
module Version
# Version finder using Body Pattern method. Tipically used when the response is not
# Version finder using Body Pattern method. Typically used when the response is not
# an HTML doc and Xpath can't be used
class BodyPattern < Finders::DynamicFinder::Version::Finder
# @return [ Hash ]
@@ -16,7 +16,7 @@ module WPScan
# @param [ Hash ] opts
# @return [ Version ]
def find(response, _opts = {})
return unless response.body =~ self.class::PATTERN
return unless response.code != 404 && response.body =~ self.class::PATTERN
create_version(
Regexp.last_match[:v],