Adds a custom temporary Enumerator for Plugins,Themes and Timthumbs

This commit is contained in:
erwanlr
2019-03-18 19:15:43 +00:00
parent 9a3db275f3
commit 4a427f1ff6
5 changed files with 128 additions and 21 deletions

View File

@@ -54,6 +54,13 @@ module WPScan
plugins_uri.to_s
end
# @param [ String ] slug
#
# @return [ String ]
def plugin_url(slug)
plugins_uri.join("#{URI.encode(slug)}/").to_s
end
# @return [ String ]
def themes_dir
@themes_dir ||= "#{content_dir}/themes"
@@ -69,6 +76,13 @@ module WPScan
themes_uri.to_s
end
# @param [ String ] slug
#
# @return [ String ]
def theme_url(slug)
themes_uri.join("#{URI.encode(slug)}/").to_s
end
# TODO: Factorise the code and the content_dir one ?
# @return [ String, False ] String of the sub_dir found, false otherwise
# @note: nil can not be returned here, otherwise if there is no sub_dir