Class: WPScan::Finders::Timthumbs::KnownLocations
Overview
Constant Summary
Constants inherited
from Finder
Finder::DIRECT_ACCESS
Instance Attribute Summary
Attributes inherited from Finder
#progress_bar, #target
Instance Method Summary
collapse
#enumerate, #full_request_params, #head_or_get_request_params, #maybe_get_full_response
Methods inherited from Finder
#browser, #found_by, #hydra, #initialize, #passive, #titleize
Instance Method Details
#aggressive(opts = {}) ⇒ Array<Timthumb>
21
22
23
24
25
26
27
28
29
30
31
|
# File 'app/finders/timthumbs/known_locations.rb', line 21
def aggressive(opts = {})
found = []
enumerate(target_urls(opts), opts.merge(check_full_response: 400)) do |res|
next unless /no image specified/i.match?(res.body)
found << Model::Timthumb.new(res.request.url, opts.merge(found_by: found_by, confidence: 100))
end
found
end
|
#create_progress_bar(opts = {}) ⇒ Object
61
62
63
|
# File 'app/finders/timthumbs/known_locations.rb', line 61
def create_progress_bar(opts = {})
super(opts.merge(title: ' Checking Known Locations -'))
end
|
#main_theme_timthumbs_paths ⇒ Object
56
57
58
59
|
# File 'app/finders/timthumbs/known_locations.rb', line 56
def main_theme_timthumbs_paths
%w[timthumb.php lib/timthumb.php inc/timthumb.php includes/timthumb.php
scripts/timthumb.php tools/timthumb.php functions/timthumb.php]
end
|
#target_urls(opts = {}) ⇒ Hash
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'app/finders/timthumbs/known_locations.rb', line 37
def target_urls(opts = {})
urls = {}
File.open(opts[:list]) do |f|
f.each_with_index do |path, index|
urls[target.url(path.chomp)] = index
end
end
if target.main_theme
main_theme_timthumbs_paths.each do |path|
urls[target.main_theme.url(path)] = 1 end
end
urls
end
|
#valid_response_codes ⇒ Array<Integer>
13
14
15
|
# File 'app/finders/timthumbs/known_locations.rb', line 13
def valid_response_codes
@valid_response_codes ||= [400]
end
|