File: //opt/PUC/webapp_config.conf
# The webapps hash is keyed on the webapp name. Each entry is a hash with the following entries:
# - id: required. Specifies the file to examine and the regex pattern to search for
# in order to identify the specified webapp.
# - nofile: optional. Specifies that the indicated files must NOT exist in order for
# the webapp to be indentified.
# - version: optional. Specifies the file to examine and the regex pattern to search
# for in order to identify the version.
#
# Note: every regex pattern should include one matching group that is returned by the regex.
my $config = {
webapps => {
wordpress => {
id => {
file => "index.php",
pattern => "(WordPress)",
},
version => {
file => "wp-includes/version.php",
pattern => 'wp_version.*=.*[\'"](\d+\.\d+\.\d+)[\'"]',
},
},
weebly => {
id => {
file => "index.html",
pattern => "(Weebly)",
}
},
joomla => {
id => {
file => "index.php",
pattern => "(Joomla)",
},
version => {
file => "joomla.xml",
pattern => '\<version\>(\d+\.\d+\.\d+)\<\/version\>',
},
},
hg_default => {
id => {
file => "default.html",
pattern => "(HostGator)",
},
nofile => [ "index.html", "index.php", ".htaccess" ],
},
},
datastore_route => '/v1/report/installed/webapp',
local_storage => {
dbfile => ':memory:',
},
};