6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/checks/drupal.rb', line 6
def generate_checks(url)
[
{
:type => "application",
:vendor => "Drupal",
:product => "Drupal",
:tags => ["CMS"],
:match_details => "Drupal version in page content",
:version => nil,
:match_type => :content_body,
:match_content => /^Drupal [0-9]+\.[0-9]+/,
:dynamic_version => lambda { |x|
_first_body_capture(x,/^Drupal ([0-9\.]*?)[ ,<\.].*$/)
},
:paths => ["#{url}/CHANGELOG.txt"]
},
{
:type => "application",
:vendor => "Drupal",
:product => "Drupal",
:tags => ["CMS"],
:match_details => "Drupal headers",
:version => nil,
:match_type => :content_headers,
:match_content => /x-generator: Drupal/,
:dynamic_version => lambda { |x|
(x,/x-generator: Drupal\ ([0-9]+)\ \(/i,)
},
:paths => ["#{url}"]
}
]
end
|