Fixes incorrect detection of the FDP data
This commit is contained in:
@@ -2,24 +2,21 @@
|
|||||||
|
|
||||||
class WpTarget < WebSite
|
class WpTarget < WebSite
|
||||||
module WpFullPathDisclosure
|
module WpFullPathDisclosure
|
||||||
|
|
||||||
# Check for Full Path Disclosure (FPD)
|
# Check for Full Path Disclosure (FPD)
|
||||||
#
|
#
|
||||||
# @return [ Boolean ]
|
# @return [ Boolean ]
|
||||||
def has_full_path_disclosure?
|
def has_full_path_disclosure?
|
||||||
response = Browser.get(full_path_disclosure_url)
|
Browser.get(full_path_disclosure_url).body[%r/Fatal error/i] ? true : false
|
||||||
response.body[%r{Fatal error}i] ? true : false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def full_path_disclosure_data
|
def full_path_disclosure_data
|
||||||
return nil unless has_full_path_disclosure?
|
return nil unless has_full_path_disclosure?
|
||||||
Browser.get(full_path_disclosure_url).body[%r{<b>([^<]+\.php)</b>}, 1]
|
Browser.get(full_path_disclosure_url).body[/Fatal error:.+? in (.+?) on/i, 1]
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [ String ]
|
# @return [ String ]
|
||||||
def full_path_disclosure_url
|
def full_path_disclosure_url
|
||||||
@uri.merge('wp-includes/rss-functions.php').to_s
|
@uri.merge('wp-includes/rss-functions.php').to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user