From 083513b0349cecdad6b4a01ca0af078b91da6f85 Mon Sep 17 00:00:00 2001 From: Palma Solutions LTD Date: Sun, 14 May 2017 09:14:57 +0200 Subject: [PATCH] externalized version.php --- sc.php | 206 +--------------------------------------------------- version.php | 189 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 191 insertions(+), 204 deletions(-) create mode 100644 version.php diff --git a/sc.php b/sc.php index c97bfd7..965b70c 100644 --- a/sc.php +++ b/sc.php @@ -1091,194 +1091,7 @@ echo '
';
 
 function version() {
 
-$versions = array(
-    array("Wordpress", "/wp-includes/version.php", "\$wp_version ="),
-    array("osCommerce", "/includes/application_top.php", "define('PROJECT_VERSION', 'osCommerce Online Merchant"),
-    array("ZenCart", "/includes/version.php", "define('PROJECT_VERSION_NAME', 'Zen Cart');"),
-    array("Drupal", "/modules/system/system.info", "version = "),
-    array("Joomla 1.0", "/includes/version.php", "\$RELEASE\|\$DEV_LEVEL"),
-    array("Joomla 1.5", "/libraries/joomla/version.php", "\$RELEASE\ =\|\$DEV_LEVEL\ ="),
-    array("Joomla 2.5", "/libraries/cms/version.php", "\$RELEASE\ =\|\$DEV_LEVEL\ ="),
-    array("Joomla 3.x", "/libraries/cms/version/version.php", "\$RELEASE\ =\|\$DEV_LEVEL\ ="),
-    array("Joomla 3.5+", "/libraries/cms/version/version.php", "const\ RELEASE\ =\|const\ DEV_LEVEL\ ="),
-    array("phpBB", "/includes/constants.php", "define('PHPBB_VERSION',"),
-    array("SMF", "/index.php", "\$forum_version = 'SMF"),
-    array("Gallery", "/modules/gallery/helpers/gallery.php", "const VERSION ="),
-    array("Coppermine", "/versioncheck.inc.php", "Coppermine version:"),
-    array("4images", "/includes/constants.php", "define('SCRIPT_VERSION',"),
-    array("MediaWiki", "/includes/DefaultSettings.php", "\$wgVersion ="),
-    array("PHPlist", "/admin/init.php", "define(\"VERSION\","),
-    array("RoundCube", "/program/include/iniset.php", "define('RCMAIL_VERSION',"),
-    array("Squirrel Mail", "/functions/strings.php", "\$version ="),
-    array("Dede CMS<", "/config_base.php", "\$cfg_soft_enname\|\$cfg_version"),
-    array("Sugar CRM", "/sugar_version.php", "\$sugar_version"),
-    array("XOOPS", "/version.php", "XOOPS_VERSION"),
-    array("Concrete5", "/config/concrete.php", "version_installed"),
-    array("Serendipity", "/serendipity_config.inc.php", "\$serendipity\['version'\] ="),
-    array("OpenBlog", "/application/config/open_blog.php", "\$config\['version'\] ="),
-    array("b2evolution", "/conf/_application.php", "\$app_version ="),
-    array("Nucleus", "/nucleus/libs/globalfunctions.php", "\$nucleus\['version'\] ="),
-    array("Dotclear", "/inc/prepend.php", "define('DC_VERSION',"),
-    array("TextPattern", "/textpattern/index.php", "\$thisversion ="),
-    array("NibbleBlog", "/admin/boot/rules/98-constants.bit", "define('NIBBLEBLOG_VERSION',"),
-    array("Lifetype", "/version.php", "\$version = \"lifetype"),
-    array("Chyrp", "/includes/common.php", "define('CHYRP_VERSION',"),
-    array("PivotX", "/pivotx/lib.php", "\$version ="),
-    array("FlatPress", "/fp-includes/core/core.system.php", "define('SYSTEM_VER',"),
-    array("Status.Net", "/lib/framework.php", "define('STATUSNET_BASE_VERSION',"),
-    array("Sharetronix", "/system/conf_main.php", "\$C->VERSION"),
-    array("PageCookery", "/global.php", "\$pcm_version ="),
-    array("StoryTLR", "/index.php", "define(\"STORYTLR_VERSION\","),
-    array("PHP-Fusion", "/administration/upgrade.php", "WHERE settings_name='version'"),
-    array("e107", "/e107_admin/ver.php", "\$e107info\['e107_version'\] ="),
-    array("Open Real Estate", "/index.php", "define('ORE_VERSION',"),
-    array("Zikula", "/lib/Zikula/Core.php", "const VERSION_NUM ="),
-    array("Website Baker", "/pages/posts/index.php", "by WebsiteBaker Ver."),
-    array("Subrion", "/index.php", "define('IA_VERSION', '"),
-    array("Pligg", "/languages/lang_english.conf", "//"),
-    array("PyroCMS", "/system/cms/config/constants.php", "define('CMS_VERSION',="),
-    array("Contao", "/system/config/localconfig.php", "\$GLOBALS\['TL_CONFIG'\]\['latestVersion'\] ="),
-    array("Geeklog", "/siteconfig.php", "define('VERSION',"),
-    array("sNews", "/snews.php", "sNews Version:"),
-    array("jCore", "/config.inc.php", "@define('JCORE_VERSION',"),
-    array("ImpressPages", "/Ip/Application.php", "; //CHANGE_ON_VERSION_UPDATE"),
-    array("Quick.CMS", "/database/config.php", "\$config\['version'\] ="),
-    array("ImpressCMS", "/include/version.php", "define('ICMS_VERSION_NAME',"), /* triggers false positive for XOOPS as it's a fork of it */
-    array("Monstra", "/engine/Monstra.php", "const VERSION ="),
-    array("phpwcms", "/include/inc_lib/revision/revision.php", "define('PHPWCMS_VERSION'"),
-    array("Redaxscript", "/languages/en.json", "version"),
-    array("Silex", "/version.txt", "version=v"),
-    array("Mahara", "/lib/version.php", "\$config->release ="),
-    array("Saurus", "/classes/site.class.php", "\$this->script_version ="),
-    array("Jamroom", "/modules/jrCore/include.php", "'version'     =>"),
-    array("Bolt", "/src/Application.php", "\$values\['bolt_version'\] ="),
-    array("Pluck", "/data/inc/security.php", "define('PLUCK_VERSION',"),
-    array("Kirby", "/kirby/kirby.php", "static public \$version ="),
-    array("Zenario", "/zenario/admin/db_updates/latest_revision_no.inc.php", "define('ZENARIO_CMS_VERSION',"),
-    array("Cotonti", "/system/functions.php", "\$cfg\['version'\] ="),
-    array("appRain", "/development/definition/system_configuration/config.xml", ""),
-    array("ClipperCMS", "/manager/includes/version.inc.php", "define('CMS_RELEASE_VERSION',"), // forked from ModX
-    array("MyBB", "/inc/class_core.php", "public \$version ="),
-    array("AEF", "/globals.php", "// AEF : Advanced Electron Forum"),
-    array("Vanilla", "/conf/config.php", "\$Configuration\['Vanilla'\]\['Version'\] ="),
-    array("PunBB", "/include/constants.php", "define('FORUM_VERSION',"),
-    array("FluxBB", "/include/common.php", "define('FORUM_VERSION',"),
-    array("Phorum", "/common.php", "define( \"PHORUM\","),
-    array("MiniBB", "/bb_functions.php", "\$version="),
-    array("Piwigo", "/include/constants.php", "define('PHPWG_VERSION"),
-    array("TinyWebGallery", "/config.php", "TWG version:"),
-    array("phpAlbum", "/main.php", "\$phpalbum_version="),
-    array("iGalerie", "/includes/classes/system.class.php", "public static \$galleryVersion ="),
-    array("Oxwall", "/ow_version.xml", ""),
-    array("Etano", "/includes/defines.inc.php", "define('_INTERNAL_VERSION_',"),
-    array("PeoplePods", "/peoplepods/lib/etc/options.php", "\$this->setLibOptions('last_database_update','"),
-    array("Family Connections", "/install.php", "\$_POST\['contact'\], 'Family Connections"),
-    array("OSClass", "/oc-load.php", "define('OSCLASS_VERSION',"),
-    array("Revive AdServer", "/constants.php", "define('VERSION',"),
-    array("WebCalendar", "/includes/config.php", "\$PROGRAM_VERSION ="),
-    array("Booked", "/lib/Config/Configuration.php", "const VERSION ="),
-    array("PHP iCalendar", "/default_config.php", "\$this->phpicalendar_version ="),
-    array("Piwik", "/core/Version.php", "const VERSION ="),
-    array("Little Poll", "/lp_admin.php", "Little Poll Admin Center v"),
-    array("Sphider", "/settings/conf.php", "\$version_nr"),
-    array("BigTree CMS", "/core/version.php", "define(\"BIGTREE_VERSION\",\""),
-    array("Quick Cart", "/database/config/general.php", "\$config\['version'\] ="),
-    array("gpEasy", "/include/common.php", "define('gpversion','"),
-    array("Elxis", "/includes/version.php", "\$elxis_version = array("),
-    array("CMSimple", "/cmsimple/cms.php", "define('CMSIMPLE_VERSION', '"),
-    array("CRE Loaded", "/includes/version.php", "define('PROJECT_VERSION', '\[CRE Loaded v"),
-    array("Expression Engine", "/config/config.php", "\$config\['app_version'\] ="),
-    array("Pydio", "/conf/VERSION.php", "define(\"AJXP_VERSION\", \""),
-    array("Aardvark Topsites", "/index.php", "\$TMPL\['version'\] ="),
-    array("Open Web Analytics", "/owa_env.php", "define('OWA_VERSION', '"),
-    array("CJ Dynamic Poll", "/poll_config.php", "\$version = \""),
-    array("Logaholic", "/includes/version.php", "define(\"LOGAHOLIC_VERSION_NUMBER\", \""),
-    array("Little Software Stats", "/inc/version.php", "define( 'VERSION'"),
-    array("qdPM", "/core/apps/qdPM/templates/_footer.php", "target=\"_blank\">qdPM"),
-    array("eyeOS", "/settings.php", "define('EYE_VERSION', '"),
-    array("Collabtive", "/init.php", "\$template->assign(\"myversion\""),
-    array("ProjectPier", "/version.php", "return '"),
-    array("PHProjekt", "/VERSION", "PHProjekt"),
-    array("TaskFreak", "/include/config.php", "define('FRK_VERSION','"),
-    array("todoyu", "/core/inc/version.php", "define('TODOYU_VERSION', '"),
-    array("FlySpray", "/includes/class.flyspray.php", "public \$version ="),
-    array("Traq", "/vendor/traq/version.php", "define(\"TRAQ_VER\","),
-    array("Eventum", "/init.php", "define('APP_VERSION',"),
-    array("Burden", "/config.php", "define('VERSION',"), /* could produce too many false positives but there's no other way */
-    array("Livezilla", "/_definitions/definitions.inc.php", "define(\"VERSION\","),
-    array("Perch", "/admin/core/lib/Perch.class.php", "public \$version ="),
-    array("Elefant CMS", "/conf/version.php", "ELEFANT_VERSION"),
-    array("Wolf CMS", "/index.php", "define('CMS_VERSION\', '"),
-    array("Anchor CMS", "/index.php", "define('VERSION', '"),
-    array("CodeIgniter", "/CodeIgniter.php", "define('CI_VERSION', '"),
-    array("GotCMS", "/library/Gc/Version.php", "const VERSION ="),
-    array("Frog CMS", "/admin/index.php", "define('FROG_VERSION', '"),
-    array("Pulse CMS", "/admin/index.php", "class=\"ver\">Pulse CMS"),
-    array("Couch CMS", "/header.php", "define( 'K_COUCH_VERSION', '"),
-    array("Kanboard", "/app/constants.php", "define('APP_VERSION', '"),
-    array("XpressEngine", "/config/config.inc.php", "define('__XE_VERSION__',"),
-    array("Hesk", "/hesk_settings.inc.php", "\$hesk_settings['hesk_version']="),
-    array("PHPWiki", "/lib/config.php", "define('PHPWIKI_VERSION',"),
-    array("PixelPost", "/includes/pixelpost.php", "Pixelpost version "),
-    array("PrestaShop", "/config/settings.inc.php", "define('_PS_VERSION_',"),
-    array("tDah Webmail", "/config.system.php", "\/SW_VERSION\/"),
-    array("Agora Cart", "/agora.cgi", "\/versions\/"),
-
-// still need to work on these
-    array("CubeCart", "/index.php", "CubeCart v"), // may need one more line
-    array("Soholaunch", "/index.php", "\#\# Soholaunch\(R\) Site Management Tool"), // needs two more lines
-    array("Silverstripe", "/cms/silverstripe_version", "*"), //needs review
-    array("Croogo", "/Vendor/croogo/croogo/VERSION.txt", "*"), // needs further review
-    array("XMB", "/db/mysql.php", "* eXtreme Message Board"), // needs 2nd line too
-    array("Dolphin", "/modules/boonex/news/install/config.php", "'compatible_with' => array("), // needs 2nd line too
-    array("WebMail Lite", "/adminpanel/VERSION", "*"), // needs further review
-    array("DotProj", "/includes/version.php", "\$dp_version_major"), // needs two more lines
-    array("PHPCollab", "/includes/settings.php", "# PhpCollab version"), // needs second line as well
-    array("Admidio", "/adm_program/system/constants.php", "define('ADMIDIO_VERSION_MAIN',"), // needs two more lines
-    array("Get Simple CMS", "/admin/inc/configuration.php", "\$site_full_name"), // needs one more line
-    array("SquirrelCart", "/squirrelcart/functions/base/sc_version.func.php", "function sc_version() {"), //needs one more line
-    array("ELGG", "/version.php", "release ="), // false positives with Moodle -< needs one more line
-    array("CMS Made Simple", "/version.php", "CMS_VERSION ="), // needs 3 lines more
-    array("DataLife Engine", "/index.php", "dle_version ="), //needs one more line
-    array("phpCoin", "/version.php", "ThisVersion"), //needs one more line
-    array("Avactis", "/version.php", "PRODUCT_VERSION_NUMBER"), // needs one more line
-    array("AccountLab Plus", "/version.php", "ALPversion="), // needs one more line
-    array("Flynax Classifieds", "/control.inc.php", "VERSION:"), // may need one more line
-    array("vBulletin", "/version.php", "fr_version ="), // may need one more line
-    array("PHP Pro Bid", "/index.php", "PHP Pro Bid v"), // needs one more line
-    array("ITLPoll", "/index.php", "ITLPoll Version"), // needs one more line
-    array("Openads", "/index.php", "\/\* Openads"), // needs one more line
-    array("phpFormGenerator", "/index.php", "phpFormGenerator v"), // needs one more line
-    array("LightMon Engine", "/index.php", "*           LightMon v"), // needs one more line
-    array("Kasseler CMS", "/index.php", "by Kasseler CMS"), // needs 4 more lines
-    array("Silurus Classifieds Builder", "/index.php", "* Silurus Classifieds Builder"), // needs 7 more lines
-    array("Bitweaver", "/config_defaults_inc.php", "BIT_MAJOR_VERSION"), // needs 3 more
-    array("phpFoX", "/version.php", "\$_CONF\[\'info.version\'\] ="), // needs one more
-    array("Open Conference System", "/version.xml", "<release>"), // needs one more
-    array("SPIP", "/svn.revision", "Origine: svn:"), // needs one more
-    array("Exponent", "/exponent_version.php", "EXPONENT_VERSION_MAJOR"), // needs 7 more
-    array("Oxy Classifieds", "/version", "*"), // two from the head
-    array("Anova Pro", "/version.txt", "Anova Pro :"), // one more
-    array("Timthumb", "/*.php", "define ('VERSION',"), // produces too many false positives
-
-);
-
-foreach($versions as $row){
-foreach(glob("./{**/*,*}".$row[1], GLOB_BRACE) as $versionfile){
-
-	$file = file_get_contents($versionfile);
-	$pattern = preg_quote($row[2], '/');
-	$pattern = "/^.*$pattern.*\$/m";
-	if(preg_match_all($pattern, $file, $matches)){
-	echo "<br />";
-   	echo "<strong>".$row[0]." found:</strong><br />";
-   	echo implode("<br />", $matches[0]);
-   	echo "<br />";
-   	print_r ("location:".$versionfile);
-	}
-  }
-}
-
+require_once("version.php");
  
 }
 
@@ -1572,21 +1385,6 @@ case 'iframe' :
     iframe();
     break;
 
-case 'blog' :
-    blog();
-    break;
-
-case 'commerce' :
-    commerce();
-    break;
-
-case 'cms' :
-    cms();
-    break;
-
-case 'rarely' :
-    rarely();
-    break;
 
 case 'lastfiles' :
     lastfiles();
@@ -1875,7 +1673,7 @@ $shell_definitions = array (
     );
 
 $generic = 'Shell';
-parse_dir( $settings[ 'BASE_DIR' ] );
+//parse_dir( $settings[ 'BASE_DIR' ] );
 echo "</pre><br />";
 ?>
 <br>
diff --git a/version.php b/version.php
new file mode 100644
index 0000000..fd48818
--- /dev/null
+++ b/version.php
@@ -0,0 +1,189 @@
+<?php
+
+$versions = array(
+    array("Wordpress", "/wp-includes/version.php", "\$wp_version ="),
+    array("osCommerce", "/includes/application_top.php", "define('PROJECT_VERSION', 'osCommerce Online Merchant"),
+    array("ZenCart", "/includes/version.php", "define('PROJECT_VERSION_NAME', 'Zen Cart');"),
+    array("Drupal", "/modules/system/system.info", "version = "),
+    array("Joomla 1.0", "/includes/version.php", "\$RELEASE\|\$DEV_LEVEL"),
+    array("Joomla 1.5", "/libraries/joomla/version.php", "\$RELEASE\ =\|\$DEV_LEVEL\ ="),
+    array("Joomla 2.5", "/libraries/cms/version.php", "\$RELEASE\ =\|\$DEV_LEVEL\ ="),
+    array("Joomla 3.x", "/libraries/cms/version/version.php", "\$RELEASE\ =\|\$DEV_LEVEL\ ="),
+    array("Joomla 3.5+", "/libraries/cms/version/version.php", "const\ RELEASE\ =\|const\ DEV_LEVEL\ ="),
+    array("phpBB", "/includes/constants.php", "define('PHPBB_VERSION',"),
+    array("SMF", "/index.php", "\$forum_version = 'SMF"),
+    array("Gallery", "/modules/gallery/helpers/gallery.php", "const VERSION ="),
+    array("Coppermine", "/versioncheck.inc.php", "Coppermine version:"),
+    array("4images", "/includes/constants.php", "define('SCRIPT_VERSION',"),
+    array("MediaWiki", "/includes/DefaultSettings.php", "\$wgVersion ="),
+    array("PHPlist", "/admin/init.php", "define(\"VERSION\","),
+    array("RoundCube", "/program/include/iniset.php", "define('RCMAIL_VERSION',"),
+    array("Squirrel Mail", "/functions/strings.php", "\$version ="),
+    array("Dede CMS<", "/config_base.php", "\$cfg_soft_enname\|\$cfg_version"),
+    array("Sugar CRM", "/sugar_version.php", "\$sugar_version"),
+    array("XOOPS", "/version.php", "XOOPS_VERSION"),
+    array("Concrete5", "/config/concrete.php", "version_installed"),
+    array("Serendipity", "/serendipity_config.inc.php", "\$serendipity\['version'\] ="),
+    array("OpenBlog", "/application/config/open_blog.php", "\$config\['version'\] ="),
+    array("b2evolution", "/conf/_application.php", "\$app_version ="),
+    array("Nucleus", "/nucleus/libs/globalfunctions.php", "\$nucleus\['version'\] ="),
+    array("Dotclear", "/inc/prepend.php", "define('DC_VERSION',"),
+    array("TextPattern", "/textpattern/index.php", "\$thisversion ="),
+    array("NibbleBlog", "/admin/boot/rules/98-constants.bit", "define('NIBBLEBLOG_VERSION',"),
+    array("Lifetype", "/version.php", "\$version = \"lifetype"),
+    array("Chyrp", "/includes/common.php", "define('CHYRP_VERSION',"),
+    array("PivotX", "/pivotx/lib.php", "\$version ="),
+    array("FlatPress", "/fp-includes/core/core.system.php", "define('SYSTEM_VER',"),
+    array("Status.Net", "/lib/framework.php", "define('STATUSNET_BASE_VERSION',"),
+    array("Sharetronix", "/system/conf_main.php", "\$C->VERSION"),
+    array("PageCookery", "/global.php", "\$pcm_version ="),
+    array("StoryTLR", "/index.php", "define(\"STORYTLR_VERSION\","),
+    array("PHP-Fusion", "/administration/upgrade.php", "WHERE settings_name='version'"),
+    array("e107", "/e107_admin/ver.php", "\$e107info\['e107_version'\] ="),
+    array("Open Real Estate", "/index.php", "define('ORE_VERSION',"),
+    array("Zikula", "/lib/Zikula/Core.php", "const VERSION_NUM ="),
+    array("Website Baker", "/pages/posts/index.php", "by WebsiteBaker Ver."),
+    array("Subrion", "/index.php", "define('IA_VERSION', '"),
+    array("Pligg", "/languages/lang_english.conf", "//<VERSION>"),
+    array("PyroCMS", "/system/cms/config/constants.php", "define('CMS_VERSION',="),
+    array("Contao", "/system/config/localconfig.php", "\$GLOBALS\['TL_CONFIG'\]\['latestVersion'\] ="),
+    array("Geeklog", "/siteconfig.php", "define('VERSION',"),
+    array("sNews", "/snews.php", "sNews Version:"),
+    array("jCore", "/config.inc.php", "@define('JCORE_VERSION',"),
+    array("ImpressPages", "/Ip/Application.php", "; //CHANGE_ON_VERSION_UPDATE"),
+    array("Quick.CMS", "/database/config.php", "\$config\['version'\] ="),
+    array("ImpressCMS", "/include/version.php", "define('ICMS_VERSION_NAME',"), /* triggers false positive for XOOPS as it's a fork of it */
+    array("Monstra", "/engine/Monstra.php", "const VERSION ="),
+    array("phpwcms", "/include/inc_lib/revision/revision.php", "define('PHPWCMS_VERSION'"),
+    array("Redaxscript", "/languages/en.json", "version"),
+    array("Silex", "/version.txt", "version=v"),
+    array("Mahara", "/lib/version.php", "\$config->release ="),
+    array("Saurus", "/classes/site.class.php", "\$this->script_version ="),
+    array("Jamroom", "/modules/jrCore/include.php", "'version'     =>"),
+    array("Bolt", "/src/Application.php", "\$values\['bolt_version'\] ="),
+    array("Pluck", "/data/inc/security.php", "define('PLUCK_VERSION',"),
+    array("Kirby", "/kirby/kirby.php", "static public \$version ="),
+    array("Zenario", "/zenario/admin/db_updates/latest_revision_no.inc.php", "define('ZENARIO_CMS_VERSION',"),
+    array("Cotonti", "/system/functions.php", "\$cfg\['version'\] ="),
+    array("appRain", "/development/definition/system_configuration/config.xml", "<appRainversion>"),
+    array("ClipperCMS", "/manager/includes/version.inc.php", "define('CMS_RELEASE_VERSION',"), // forked from ModX
+    array("MyBB", "/inc/class_core.php", "public \$version ="),
+    array("AEF", "/globals.php", "// AEF : Advanced Electron Forum"),
+    array("Vanilla", "/conf/config.php", "\$Configuration\['Vanilla'\]\['Version'\] ="),
+    array("PunBB", "/include/constants.php", "define('FORUM_VERSION',"),
+    array("FluxBB", "/include/common.php", "define('FORUM_VERSION',"),
+    array("Phorum", "/common.php", "define( \"PHORUM\","),
+    array("MiniBB", "/bb_functions.php", "\$version="),
+    array("Piwigo", "/include/constants.php", "define('PHPWG_VERSION"),
+    array("TinyWebGallery", "/config.php", "TWG version:"),
+    array("phpAlbum", "/main.php", "\$phpalbum_version="),
+    array("iGalerie", "/includes/classes/system.class.php", "public static \$galleryVersion ="),
+    array("Oxwall", "/ow_version.xml", "<version>"),
+    array("Etano", "/includes/defines.inc.php", "define('_INTERNAL_VERSION_',"),
+    array("PeoplePods", "/peoplepods/lib/etc/options.php", "\$this->setLibOptions('last_database_update','"),
+    array("Family Connections", "/install.php", "\$_POST\['contact'\], 'Family Connections"),
+    array("OSClass", "/oc-load.php", "define('OSCLASS_VERSION',"),
+    array("Revive AdServer", "/constants.php", "define('VERSION',"),
+    array("WebCalendar", "/includes/config.php", "\$PROGRAM_VERSION ="),
+    array("Booked", "/lib/Config/Configuration.php", "const VERSION ="),
+    array("PHP iCalendar", "/default_config.php", "\$this->phpicalendar_version ="),
+    array("Piwik", "/core/Version.php", "const VERSION ="),
+    array("Little Poll", "/lp_admin.php", "Little Poll Admin Center v"),
+    array("Sphider", "/settings/conf.php", "\$version_nr"),
+    array("BigTree CMS", "/core/version.php", "define(\"BIGTREE_VERSION\",\""),
+    array("Quick Cart", "/database/config/general.php", "\$config\['version'\] ="),
+    array("gpEasy", "/include/common.php", "define('gpversion','"),
+    array("Elxis", "/includes/version.php", "\$elxis_version = array("),
+    array("CMSimple", "/cmsimple/cms.php", "define('CMSIMPLE_VERSION', '"),
+    array("CRE Loaded", "/includes/version.php", "define('PROJECT_VERSION', '\[CRE Loaded v"),
+    array("Expression Engine", "/config/config.php", "\$config\['app_version'\] ="),
+    array("Pydio", "/conf/VERSION.php", "define(\"AJXP_VERSION\", \""),
+    array("Aardvark Topsites", "/index.php", "\$TMPL\['version'\] ="),
+    array("Open Web Analytics", "/owa_env.php", "define('OWA_VERSION', '"),
+    array("CJ Dynamic Poll", "/poll_config.php", "\$version = \""),
+    array("Logaholic", "/includes/version.php", "define(\"LOGAHOLIC_VERSION_NUMBER\", \""),
+    array("Little Software Stats", "/inc/version.php", "define( 'VERSION'"),
+    array("qdPM", "/core/apps/qdPM/templates/_footer.php", "target=\"_blank\">qdPM"),
+    array("eyeOS", "/settings.php", "define('EYE_VERSION', '"),
+    array("Collabtive", "/init.php", "\$template->assign(\"myversion\""),
+    array("ProjectPier", "/version.php", "return '"),
+    array("PHProjekt", "/VERSION", "PHProjekt"),
+    array("TaskFreak", "/include/config.php", "define('FRK_VERSION','"),
+    array("todoyu", "/core/inc/version.php", "define('TODOYU_VERSION', '"),
+    array("FlySpray", "/includes/class.flyspray.php", "public \$version ="),
+    array("Traq", "/vendor/traq/version.php", "define(\"TRAQ_VER\","),
+    array("Eventum", "/init.php", "define('APP_VERSION',"),
+    array("Burden", "/config.php", "define('VERSION',"), /* could produce too many false positives but there's no other way */
+    array("Livezilla", "/_definitions/definitions.inc.php", "define(\"VERSION\","),
+    array("Perch", "/admin/core/lib/Perch.class.php", "public \$version ="),
+    array("Elefant CMS", "/conf/version.php", "ELEFANT_VERSION"),
+    array("Wolf CMS", "/index.php", "define('CMS_VERSION\', '"),
+    array("Anchor CMS", "/index.php", "define('VERSION', '"),
+    array("CodeIgniter", "/CodeIgniter.php", "define('CI_VERSION', '"),
+    array("GotCMS", "/library/Gc/Version.php", "const VERSION ="),
+    array("Frog CMS", "/admin/index.php", "define('FROG_VERSION', '"),
+    array("Pulse CMS", "/admin/index.php", "class=\"ver\">Pulse CMS"),
+    array("Couch CMS", "/header.php", "define( 'K_COUCH_VERSION', '"),
+    array("Kanboard", "/app/constants.php", "define('APP_VERSION', '"),
+    array("XpressEngine", "/config/config.inc.php", "define('__XE_VERSION__',"),
+    array("Hesk", "/hesk_settings.inc.php", "\$hesk_settings['hesk_version']="),
+    array("PHPWiki", "/lib/config.php", "define('PHPWIKI_VERSION',"),
+    array("PixelPost", "/includes/pixelpost.php", "Pixelpost version "),
+    array("PrestaShop", "/config/settings.inc.php", "define('_PS_VERSION_',"),
+    array("tDah Webmail", "/config.system.php", "\/SW_VERSION\/"),
+    array("Agora Cart", "/agora.cgi", "\/versions\/"),
+
+// still need to work on these
+    array("CubeCart", "/index.php", "CubeCart v"), // may need one more line
+    array("Soholaunch", "/index.php", "\#\# Soholaunch\(R\) Site Management Tool"), // needs two more lines
+    array("Silverstripe", "/cms/silverstripe_version", "*"), //needs review
+    array("Croogo", "/Vendor/croogo/croogo/VERSION.txt", "*"), // needs further review
+    array("XMB", "/db/mysql.php", "* eXtreme Message Board"), // needs 2nd line too
+    array("Dolphin", "/modules/boonex/news/install/config.php", "'compatible_with' => array("), // needs 2nd line too
+    array("WebMail Lite", "/adminpanel/VERSION", "*"), // needs further review
+    array("DotProj", "/includes/version.php", "\$dp_version_major"), // needs two more lines
+    array("PHPCollab", "/includes/settings.php", "# PhpCollab version"), // needs second line as well
+    array("Admidio", "/adm_program/system/constants.php", "define('ADMIDIO_VERSION_MAIN',"), // needs two more lines
+    array("Get Simple CMS", "/admin/inc/configuration.php", "\$site_full_name"), // needs one more line
+    array("SquirrelCart", "/squirrelcart/functions/base/sc_version.func.php", "function sc_version() {"), //needs one more line
+    array("ELGG", "/version.php", "release ="), // false positives with Moodle -< needs one more line
+    array("CMS Made Simple", "/version.php", "CMS_VERSION ="), // needs 3 lines more
+    array("DataLife Engine", "/index.php", "dle_version ="), //needs one more line
+    array("phpCoin", "/version.php", "ThisVersion"), //needs one more line
+    array("Avactis", "/version.php", "PRODUCT_VERSION_NUMBER"), // needs one more line
+    array("AccountLab Plus", "/version.php", "ALPversion="), // needs one more line
+    array("Flynax Classifieds", "/control.inc.php", "VERSION:"), // may need one more line
+    array("vBulletin", "/version.php", "fr_version ="), // may need one more line
+    array("PHP Pro Bid", "/index.php", "PHP Pro Bid v"), // needs one more line
+    array("ITLPoll", "/index.php", "ITLPoll Version"), // needs one more line
+    array("Openads", "/index.php", "\/\* Openads"), // needs one more line
+    array("phpFormGenerator", "/index.php", "<title>phpFormGenerator v"), // needs one more line
+    array("LightMon Engine", "/index.php", "*           LightMon v"), // needs one more line
+    array("Kasseler CMS", "/index.php", "by Kasseler CMS"), // needs 4 more lines
+    array("Silurus Classifieds Builder", "/index.php", "* Silurus Classifieds Builder"), // needs 7 more lines
+    array("Bitweaver", "/config_defaults_inc.php", "BIT_MAJOR_VERSION"), // needs 3 more
+    array("phpFoX", "/version.php", "\$_CONF\[\'info.version\'\] ="), // needs one more
+    array("Open Conference System", "/version.xml", "<release>"), // needs one more
+    array("SPIP", "/svn.revision", "Origine: svn:"), // needs one more
+    array("Exponent", "/exponent_version.php", "EXPONENT_VERSION_MAJOR"), // needs 7 more
+    array("Oxy Classifieds", "/version", "*"), // two from the head
+    array("Anova Pro", "/version.txt", "Anova Pro :"), // one more
+    array("Timthumb", "/*.php", "define ('VERSION',"), // produces too many false positives
+
+);
+
+foreach($versions as $row){
+foreach(glob("../{**/*,*}".$row[1], GLOB_BRACE) as $versionfile){
+
+	$file = file_get_contents($versionfile);
+	$pattern = preg_quote($row[2], '/');
+	$pattern = "/^.*$pattern.*\$/m";
+	if(preg_match_all($pattern, $file, $matches)){
+	echo "<br />";
+   	echo "<strong>".$row[0]." found:</strong><br />";
+   	echo implode("<br />", $matches[0]);
+   	echo "<br />";
+   	print_r ("location:".$versionfile);
+	}
+  }
+}