Skip to content

Commit

Permalink
Added basic CakePHP detection
Browse files Browse the repository at this point in the history
  • Loading branch information
jekyc committed Feb 17, 2014
1 parent 7518fc1 commit 8360320
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 1 deletion.
Binary file modified classes/__pycache__/results.cpython-33.pyc
Binary file not shown.
8 changes: 8 additions & 0 deletions data/cms/header/cakephp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"url": "/",
"header": "Set-Cookie",
"regex": "(CAKEPHP)",
"output": ""
}
]
2 changes: 1 addition & 1 deletion data/cms/header/drupal.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"url": "/",
"header": "X-Drupal-Cache",
"regex": "(?:AB|CDE)",
"regex": "(?:HIT|MISS)",
"output": "",
"weight": 0.1
}
Expand Down
7 changes: 7 additions & 0 deletions data/cms/string/cakephp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"url": "/",
"string": "Powered by <a href=\"http://cakephp.org\">CakePHP</a>",
"output": ""
}
]
1 change: 1 addition & 0 deletions plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__all__ = [
"concrete5",
"cakephp",
"demandware",
"dokuwiki",
"dotcms",
Expand Down
21 changes: 21 additions & 0 deletions plugins/cakephp.py
Original file line number Diff line number Diff line change
@@ -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),
]

0 comments on commit 8360320

Please sign in to comment.