update wp_target.rb
Refactor if else statement - wp_content_dir (credits: ethicalhack3r)
This commit is contained in:
@@ -49,11 +49,7 @@ class WpTarget < WebSite
|
|||||||
fail "The target is responding with a 403, this might be due to a WAF or a plugin.\n" \
|
fail "The target is responding with a 403, this might be due to a WAF or a plugin.\n" \
|
||||||
'You should try to supply a valid user-agent via the --user-agent option or use the --random-agent option' if response.code == 403
|
'You should try to supply a valid user-agent via the --user-agent option or use the --random-agent option' if response.code == 403
|
||||||
|
|
||||||
if wp_content_dir
|
dir = wp_content_dir ? wp_content_dir : 'wp-content'
|
||||||
dir = wp_content_dir
|
|
||||||
else
|
|
||||||
dir = 'wp-content'
|
|
||||||
end
|
|
||||||
|
|
||||||
if response.body =~ /["'][^"']*\/#{Regexp.escape(dir)}\/[^"']*["']/i
|
if response.body =~ /["'][^"']*\/#{Regexp.escape(dir)}\/[^"']*["']/i
|
||||||
wordpress = true
|
wordpress = true
|
||||||
|
|||||||
Reference in New Issue
Block a user