Class: Intrigue::Ident::Check::Amazon

Inherits:
Base
  • Object
show all
Defined in:
lib/checks/amazon.rb

Instance Method Summary collapse

Methods inherited from Base

inherited

Instance Method Details

#generate_checks(url) ⇒ Object



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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/checks/amazon.rb', line 6

def generate_checks(url)
  [
    {
      :type => "service",
      :vendor => "Amazon",
      :product =>"Cloudfront",
      :match_details =>"cloudfront cache header",
      :version => nil,
      :match_type => :content_headers,
      :match_content =>  /via:.*.cloudfront.net \(CloudFront\)/,
      :hide => false,
      :paths => ["#{url}"]
    },
    {
      :type => "service",
      :vendor => "Amazon",
      :product =>"Cloudfront",
      :match_details =>"Cloudfront - no configured hostname error condition",
      :version => nil,
      :match_type => :content_body,
      :match_content =>  /ERROR: The request could not be satisfied/,
      :hide => true,
      :paths => ["#{url}"]
    },
    {
      :type => "service",
      :vendor => "Amazon",
      :product =>"Cloudfront",
      :match_details =>"Cloudfront - no configured hostname error condition",
      :version => nil,
      :match_type => :content_headers,
      :match_content =>  /Error from cloudfront/,
      :hide => true,
      :paths => ["#{url}"]
    },
    {
      :type => "service",
      :vendor => "Amazon",
      :product =>"Cloudfront",
      :match_details =>"Cloudfront - 403 error condition",
      :version => nil,
      :match_type => :content_body,
      :match_content =>  /<h1>403 Forbidden<\/h1><\/center>\n<hr><center>cloudflare/,
      :hide => true,
      :paths => ["#{url}"]
    },
    {
      :tags => ["error_page","hosting_provider"],
      :type => "service",
      :url => "https://aws.amazon.com/elasticloadbalancing/",
      :vendor => "Amazon",
      :product => "Elastic Load Balancer",
      :version => nil,
      :match_type => :content_headers,
      :match_content =>  /awselb\/\d.\d/,
      :match_details =>"Amazon Elastic Load Balancer",
      :hide => true,
      :dynamic_version => lambda { |x| x["details"]["headers"].join("\n").match(/awselb\/(\d.\d)/).captures[0] },
      :verify_sites => ["http://52.4.103.22:80"],
      :paths => ["#{url}"]
    }
  ]
end