From 83603208a2a128d83f8b50844fcb613287c594b0 Mon Sep 17 00:00:00 2001 From: jekyc Date: Tue, 18 Feb 2014 00:35:22 +0100 Subject: [PATCH] Added basic CakePHP detection --- classes/__pycache__/results.cpython-33.pyc | Bin 3457 -> 3493 bytes data/cms/header/cakephp.json | 8 ++++++++ data/cms/header/drupal.json | 2 +- data/cms/string/cakephp.json | 7 +++++++ plugins/__init__.py | 1 + plugins/cakephp.py | 21 +++++++++++++++++++++ 6 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 data/cms/header/cakephp.json create mode 100644 data/cms/string/cakephp.json create mode 100644 plugins/cakephp.py diff --git a/classes/__pycache__/results.cpython-33.pyc b/classes/__pycache__/results.cpython-33.pyc index 2e43cf093ee7ec9d5e9dc9e8ea965a533b99c036..b98e390bc406eb3de8ef30bb073c901c7e43eee1 100644 GIT binary patch delta 175 zcmZpaUMkHwkB67*%xtD$<&B(6nHjfFUe7FT$jZ>n$WX$_kj=zUq|cDT%uvh9kjKDK z!oX0&f+ST8;uZxmq_9kWz-%Qv9Z3NTSnuY^x-3eJtdj#+q*zNCfM9YK%XMB65Q~wE zk&8))fpfAK>jp;2&A(Z5m>A_IXK>tLRGsX|Ih#>?^Igt8jEpjyXK^bsGV)E{!*dh> DTNWr9 delta 138 zcmZ1~-6+jDkB67b;L`6P){UG?nHlFyUe7Eo#=_9d$WX$_kj=zU6v0r#!cb(!kitCq zH?x&+4MPb7NCc#S1*~AkWDgc4MwZFhEK-xZSgvylFaQA~7bDl?Jk|}2;+y5!a+nxp kCiigMU{s!*$~l`+b2B5?9!5r~&HK0&85wydKj1kE07o<;TmS$7 diff --git a/data/cms/header/cakephp.json b/data/cms/header/cakephp.json new file mode 100644 index 0000000..3db0d3d --- /dev/null +++ b/data/cms/header/cakephp.json @@ -0,0 +1,8 @@ +[ + { + "url": "/", + "header": "Set-Cookie", + "regex": "(CAKEPHP)", + "output": "" + } +] \ No newline at end of file diff --git a/data/cms/header/drupal.json b/data/cms/header/drupal.json index 8e433f9..4af0750 100644 --- a/data/cms/header/drupal.json +++ b/data/cms/header/drupal.json @@ -9,7 +9,7 @@ { "url": "/", "header": "X-Drupal-Cache", - "regex": "(?:AB|CDE)", + "regex": "(?:HIT|MISS)", "output": "", "weight": 0.1 } diff --git a/data/cms/string/cakephp.json b/data/cms/string/cakephp.json new file mode 100644 index 0000000..df3282b --- /dev/null +++ b/data/cms/string/cakephp.json @@ -0,0 +1,7 @@ +[ + { + "url": "/", + "string": "Powered by CakePHP", + "output": "" + } +] \ No newline at end of file diff --git a/plugins/__init__.py b/plugins/__init__.py index 8c7c7da..91d8743 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -1,5 +1,6 @@ __all__ = [ "concrete5", +"cakephp", "demandware", "dokuwiki", "dotcms", diff --git a/plugins/cakephp.py b/plugins/cakephp.py new file mode 100644 index 0000000..1b6dd52 --- /dev/null +++ b/plugins/cakephp.py @@ -0,0 +1,21 @@ +from classes.specializedRequesters import CMSReqMD5, CMSReqString, CMSReqRegex, CMSReqHeader + +class CakePHPString(CMSReqString): + def __init__(self, host, cache, results): + super().__init__(host, cache, results) + self.name = "CakePHP" + self.prefix = [""] + self.data_file = "data/cms/string/cakephp.json" + + +class CakePHPHeader(CMSReqHeader): + def __init__(self, host, cache, results): + super().__init__(host, cache, results) + self.name = "CakePHP" + self.data_file = "data/cms/header/cakephp.json" + +def get_instances(host, cache, results): + return [ + CakePHPString(host, cache, results), + CakePHPHeader(host, cache, results), + ]