Merge pull request #1233 from FenrirSec/fix_wordpress_hosted
Fixed pattern matching on target.wordpress_hosted
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user