Merge pull request #1233 from FenrirSec/fix_wordpress_hosted

Fixed pattern matching on target.wordpress_hosted
This commit is contained in:
Ryan Dewhurst
2018-10-29 13:46:50 +01:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ module WPScan
end
def wordpress_hosted?
uri.host =~ /wordpress.com$/i ? true : false
uri.host =~ /\.wordpress\.com$/i ? true : false
end
# @param [ String ] username

View File

@@ -37,5 +37,11 @@ shared_examples WPScan::Target::Platform::WordPress do
its(:wordpress_hosted?) { should be true }
end
context 'when the target host doesn\'t matches' do
let(:url) { 'http://ex-wordpress.com' }
its(:wordpress_hosted?) { should be false }
end
end
end