Improve a bit some regexp (#1804)

* Improve a bit some regexp

- Prepend `^` when possible
- Append `$` when possible

Those changes have been tested on official websites of changed
technologies.

* Relax the Apache detection
main
jvoisin 7 years ago committed by Elbert Alias
parent b069b37f1b
commit 9c1e5ecd75

@ -14,8 +14,8 @@
"1" "1"
], ],
"headers": { "headers": {
"Set-Cookie": "BITRIX_", "Set-Cookie": "^BITRIX_",
"X-Powered-CMS": "Bitrix Site Manager" "X-Powered-CMS": "^Bitrix Site Manager"
}, },
"html": "(?:<link[^>]+components/bitrix|(?:src|href)=\"/bitrix/(?:js|templates))", "html": "(?:<link[^>]+components/bitrix|(?:src|href)=\"/bitrix/(?:js|templates))",
"icon": "1C-Bitrix.png", "icon": "1C-Bitrix.png",
@ -589,7 +589,7 @@
"22" "22"
], ],
"headers": { "headers": {
"Server": "Apache-Coyote(/1\\.1)?\\;version:\\1?4.1+:", "Server": "^Apache-Coyote(/1\\.1)?$\\;version:\\1?4.1+:",
"X-Powered-By": "\bTomcat\b(?:-([\\d.]+))?\\;version:\\1" "X-Powered-By": "\bTomcat\b(?:-([\\d.]+))?\\;version:\\1"
}, },
"icon": "Apache Tomcat.svg", "icon": "Apache Tomcat.svg",
@ -1225,7 +1225,7 @@
"1" "1"
], ],
"headers": { "headers": {
"X-Powered-By": "Dragonfly CMS" "X-Powered-By": "^Dragonfly CMS"
}, },
"icon": "CPG Dragonfly.png", "icon": "CPG Dragonfly.png",
"implies": "PHP", "implies": "PHP",
@ -1776,7 +1776,7 @@
"1" "1"
], ],
"headers": { "headers": {
"X-Powered-By": "CppCMS/([\\d.]+)\\;version:\\1" "X-Powered-By": "^CppCMS/([\\d.]+)$\\;version:\\1"
}, },
"icon": "CppCMS.png", "icon": "CppCMS.png",
"implies": "C\\+\\+", "implies": "C\\+\\+",
@ -1787,8 +1787,8 @@
"1" "1"
], ],
"headers": { "headers": {
"Set-Cookie": "CraftSessionId=", "Set-Cookie": "^CraftSessionId=",
"X-Powered-By": "Craft CMS" "X-Powered-By": "^Craft CMS$"
}, },
"icon": "Craft CMS.svg", "icon": "Craft CMS.svg",
"implies": "Yii", "implies": "Yii",
@ -2143,12 +2143,12 @@
"8" "8"
], ],
"headers": { "headers": {
"Set-Cookie": "DokuWiki=" "Set-Cookie": "^DokuWiki="
}, },
"icon": "DokuWiki.png", "icon": "DokuWiki.png",
"implies": "PHP", "implies": "PHP",
"meta": { "meta": {
"generator": "DokuWiki( Release [\\-\\d]+)?\\;version:\\1" "generator": "^DokuWiki( Release [\\-\\d]+)?\\;version:\\1"
}, },
"website": "http://www.dokuwiki.org" "website": "http://www.dokuwiki.org"
}, },
@ -2648,7 +2648,7 @@
"18" "18"
], ],
"headers": { "headers": {
"X-Powered-By": "Fat-Free Framework" "X-Powered-By": "^Fat-Free Framework$"
}, },
"icon": "Fat-Free Framework.png", "icon": "Fat-Free Framework.png",
"implies": "PHP", "implies": "PHP",
@ -2722,7 +2722,7 @@
"html": "<!--[^>]+FlexCMP[^>v]+v\\. ([\\d.]+)\\;version:\\1", "html": "<!--[^>]+FlexCMP[^>v]+v\\. ([\\d.]+)\\;version:\\1",
"icon": "FlexCMP.png", "icon": "FlexCMP.png",
"meta": { "meta": {
"generator": "FlexCMP" "generator": "^FlexCMP"
}, },
"website": "http://www.flexcmp.com/cms/home" "website": "http://www.flexcmp.com/cms/home"
}, },
@ -5145,7 +5145,7 @@
"1" "1"
], ],
"headers": { "headers": {
"X-Powered-By": "Medium" "X-Powered-By": "^Medium$"
}, },
"icon": "Medium.svg", "icon": "Medium.svg",
"script": "medium\\.com", "script": "medium\\.com",
@ -5373,7 +5373,8 @@
"18" "18"
], ],
"headers": { "headers": {
"x-powered-by": "mojolicious" "x-powered-by": "mojolicious",
"server": "^mojolicious"
}, },
"icon": "Mojolicious.png", "icon": "Mojolicious.png",
"implies": "Perl", "implies": "Perl",
@ -5747,7 +5748,7 @@
"env": "^Nette$", "env": "^Nette$",
"headers": { "headers": {
"Set-Cookie": "nette-browser=", "Set-Cookie": "nette-browser=",
"X-Powered-By": "Nette Framework" "X-Powered-By": "^Nette Framework"
}, },
"html": [ "html": [
"<input[^>]+data-nette-rules", "<input[^>]+data-nette-rules",
@ -6235,8 +6236,8 @@
], ],
"headers": { "headers": {
"Server": "php/?([\\d.]+)?\\;version:\\1", "Server": "php/?([\\d.]+)?\\;version:\\1",
"Set-Cookie": "PHPSESSID", "Set-Cookie": "^PHPSESSID",
"X-Powered-By": "php/?([\\d.]+)?\\;version:\\1" "X-Powered-By": "^php/?([\\d.]+)?\\;version:\\1"
}, },
"icon": "PHP.svg", "icon": "PHP.svg",
"url": "\\.php(?:$|\\?)", "url": "\\.php(?:$|\\?)",
@ -6454,7 +6455,7 @@
"18" "18"
], ],
"headers": { "headers": {
"X-Powered-By": "pimcore" "X-Powered-By": "^pimcore$"
}, },
"icon": "pimcore.svg", "icon": "pimcore.svg",
"implies": "PHP", "implies": "PHP",

Loading…
Cancel
Save