From 8648312a852086b1a6dcc313ee73f7873b2284a5 Mon Sep 17 00:00:00 2001 From: CKAN User Date: Sat, 30 Apr 2022 04:35:06 +0000 Subject: [PATCH] Add nginx WAF server --- ckanext/spatial/harvesters/waf.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ckanext/spatial/harvesters/waf.py b/ckanext/spatial/harvesters/waf.py index c9edf421..4ea3247f 100644 --- a/ckanext/spatial/harvesters/waf.py +++ b/ckanext/spatial/harvesters/waf.py @@ -235,6 +235,16 @@ def fetch_stage(self, harvest_object): ,adjacent=False, joinString=' ').setResultsName('date') ) +nginx = parse.SkipTo(parse.CaselessLiteral("", include=True).suppress() \ + + parse.Optional(parse.Literal('')).suppress() \ + + parse.Optional(parse.Combine( + parse.Word(parse.alphanums+'-') + + parse.Word(parse.alphanums+':') + ,adjacent=False, joinString=' ').setResultsName('date') + ) + iis = parse.SkipTo("
").suppress() \ + parse.OneOrMore("
").suppress() \ + parse.Optional(parse.Combine( @@ -252,12 +262,15 @@ def fetch_stage(self, harvest_object): scrapers = {'apache': parse.OneOrMore(parse.Group(apache)), + 'nginx': parse.OneOrMore(parse.Group(nginx)), 'other': parse.OneOrMore(parse.Group(other)), 'iis': parse.OneOrMore(parse.Group(iis))} def _get_scraper(server): if not server or 'apache' in server.lower(): return 'apache' + if 'nginx' in server.lower(): + return 'nginx' if server == 'Microsoft-IIS/7.5': return 'iis' else: