Fixes regexp perf

This commit is contained in:
erwanlr
2019-07-31 14:54:57 +01:00
parent 53fdac1038
commit 8b67dad456
11 changed files with 12 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ module WPScan
path = 'wp-content/uploads/dump.sql'
res = target.head_and_get(path, [200], get: { headers: { 'Range' => 'bytes=0-3000' } })
return unless res.body =~ SQL_PATTERN
return unless SQL_PATTERN.match?(res.body)
Model::UploadSQLDump.new(
target.url(path),