Class: Intrigue::Ident::Check::Atlassian

Inherits:
Base
  • Object
show all
Defined in:
lib/checks/atlassian.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
69
# File 'lib/checks/atlassian.rb', line 6

def generate_checks(url)
  [
    {
      :type => "application",
      :vendor => "Atlassian",
      :product =>"BitBucket",
      :match_details =>"Atlassian BitBucket",
      :version => nil,
      :match_type => :content_body,
      :match_content =>  /com.atlassian.bitbucket.server/i,
      :paths => ["#{url}"]
    },
    {
      :type => "application",
      :vendor => "Atlassian",
      :product =>"Confluence",
      :match_details =>"Atlassian Confluence",
      :version => nil,
      :match_type => :content_headers,
      :match_content =>  /X-Confluence-Request-Time/i,
      :paths => ["#{url}"]
    },
    {
      :type => "application",
      :vendor => "Atlassian",
      :product =>"Crucible",
      :match_details =>"Atlassian Crucible",
      :version => nil,
      :match_type => :content_body,
      :match_content =>  /FishEye and Crucible/,
      :dynamic_version => lambda{ |x|
        _first_body_capture(x, /Log in to FishEye and Crucible (.*)\</)
      },
      :paths => ["#{url}"]
    },
    {
      :type => "application",
      :vendor => "Atlassian",
      :product =>"Hipchat",
      :match_details =>"Atlassian Hipchat",
      :version => nil,
      :match_type => :content_body,
      :match_content =>  /\$\(document\).trigger\('hipchat.load'\);/,
      :examples => ["https://api.appfire.com:443"],
      :paths => ["#{url}"]
    },
    {
      :type => "application",
      :vendor => "Atlassian",
      :product =>"Jira",
      :match_details =>"Atlassian Jira",
      :version => nil,
      :match_type => :content_cookies,
      :match_content =>  /atlassian.xsrf.token=/i,
      :dynamic_version => lambda{ |x|
          _first_body_capture(x,/<meta name="ajs-version-number" content="(.*)">/)
      },
      :examples => [
        "http://jira.understood.org/",
        "http://jira.londonandpartners.com:80"],
      :paths => ["#{url}"]
    }
  ]
end