Add WPCHECK (Bool) advanced option to Exploit::Remote::HTTP::Wordpress
parent
c2094c8ca8
commit
df2f58fb08
|
@ -38,7 +38,8 @@ module Msf
|
|||
|
||||
register_advanced_options(
|
||||
[
|
||||
Msf::OptString.new('WPCONTENTDIR', [true, 'The name of the wp-content directory', 'wp-content'])
|
||||
Msf::OptString.new('WPCONTENTDIR', [true, 'The name of the wp-content directory', 'wp-content']),
|
||||
Msf::OptBool.new('WPCHECK', [true, 'Check if the website is a valid WordPress install', true]),
|
||||
], Msf::Exploit::Remote::HTTP::Wordpress
|
||||
)
|
||||
end
|
||||
|
|
|
@ -5,6 +5,11 @@ module Msf::Exploit::Remote::HTTP::Wordpress::Base
|
|||
#
|
||||
# @return [Rex::Proto::Http::Response,nil] Returns the HTTP response if the site is online and running wordpress, nil otherwise
|
||||
def wordpress_and_online?
|
||||
unless datastore['WPCHECK']
|
||||
vprint_status 'Skipping WordPress check...'
|
||||
return true
|
||||
end
|
||||
|
||||
wordpress_detect_regexes = [
|
||||
/["'][^"']*\/#{Regexp.escape(wp_content_dir)}\/[^"']*["']/i,
|
||||
/<link rel=["']wlwmanifest["'].*href=["'].*\/wp-includes\/wlwmanifest\.xml["'] \/>/i,
|
||||
|
|
Loading…
Reference in New Issue