Files
wpscan/lib/common/models/wp_timthumb/versionable.rb
Christian Mehlmauer 442884b5c5 remove executable flags
2016-05-09 16:19:11 +02:00

25 lines
530 B
Ruby

# encoding: UTF-8
class WpTimthumb < WpItem
module Versionable
# Get the version from the body of an invalid request
# See https://code.google.com/p/timthumb/source/browse/trunk/timthumb.php#426
#
# @return [ String ] The version
def version
unless @version
response = Browser.get(url)
@version = response.body[%r{TimThumb version\s*: ([^<]+)} , 1]
end
@version
end
# @return [ String ]
def to_s
"#{url}#{ ' v' + version if version}"
end
end
end