File: bootstrap.rb

package info (click to toggle)
whatweb 0.6.1-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 23,948 kB
  • sloc: ruby: 43,493; sh: 213; makefile: 41
file content (59 lines) | stat: -rw-r--r-- 3,007 bytes parent folder | download
1
2
3
4
5
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
##
# This file is part of WhatWeb and may be subject to
# redistribution and commercial restrictions. Please see the WhatWeb
# web site for more information on licensing and terms of use.
# https://morningstarsecurity.com/research/whatweb
#
Plugin.define do
	name "Bootstrap"
	authors [
        "Janosch Maier @Phylu", # v0.1 # 2020-02-05 # Created plugin
                                # v0.2 # 2020-02-07 # Added aggressive version detection
                                # v0.3 # 2020-02-19 # Improved aggressive version detection
	]
	version "0.3"
	description "Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. "
	website "https://getbootstrap.com/"

	# Matches #
	matches [

    # JavaScript
    { :regexp=>/<script [^>]*bootstrap/ },

    # CSS
    { :regexp=>/<link [^>]*bootstrap/},

    # JavaScript # Version Detection
    { :version=>/bootstrap(\.min)?\.js\?ver=([0-9\.]+)['"]/, :offset=>1 },
    { :version=>/bootstrap\/([0-9\.]+)(\/js)?\/bootstrap(\.min)?\.js/, :offset=>0 },
    { :version=>/bootstrap-([0-9\.]+)(\.min)?\.js/, :offset=>0 },

    # CSS # Version Detection
    { :version=>/bootstrap(\.min)?\.css\?ver=([0-9\.]+)['"]/, :offset=>1 },
    { :version=>/bootstrap\/([0-9\.]+)(\/css)?\/bootstrap(\.min)?\.css/, :offset=>0 },
    { :version=>/bootstrap-([0-9\.]+)(\.min)?\.css/, :offset=>0 },

    # JavaScript # Version Detection # Agressive
    { :url=>"bootstrap/js/bootstrap.js", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"bootstrap/js/bootstrap.bundle.js", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"bootstrap/js/bootstrap.min.js", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"bootstrap/js/bootstrap.bundle.min.js", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"js/bootstrap.js", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"js/bootstrap.bundle.js", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"js/bootstrap.min.js", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"js/bootstrap.bundle.min.js", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },

    # CSS # Version Detection # Agressive
    { :url=>"bootstrap/css/bootstrap.css", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"bootstrap/css/bootstrap.bundle.css", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"bootstrap/css/bootstrap.min.css", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"bootstrap/css/bootstrap.bundle.min.css", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"css/bootstrap.css", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"css/bootstrap.bundle.css", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"css/bootstrap.min.css", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 },
    { :url=>"css/bootstrap.bundle.min.css", :version=>/Bootstrap ([vV])?([0-9\.]+)/, :offset=>1 }

	] 

end