From ec0a3a52a80196edd80a46a3c3afa1e2ae3df23e Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Sun, 3 Jan 2016 09:28:19 +0100 Subject: [PATCH] Fix _normalizeURI substitution. Fix _normalizeParameters. Fix -r argument --- iwla.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/iwla.py b/iwla.py index 73d3d2c..caaa7d1 100755 --- a/iwla.py +++ b/iwla.py @@ -337,7 +337,7 @@ class IWLA(object): def _normalizeURI(self, uri): if uri == '/': return uri - uri = self.normalize_uri_final_slashes.sub('', uri) + uri = self.normalize_uri_final_slashes.sub('/', uri) return uri def _normalizeParameters(self, parameters): @@ -367,7 +367,9 @@ class IWLA(object): if hit['http_referer']: referer_groups = self.uri_re.match(hit['http_referer']) if referer_groups: - hit['extract_referer'] = self._normalizeURI(referer_groups.groupdict()) + hit['extract_referer'] = referer_groups.groupdict() + hit['extract_referer']['extract_uri'] = self._normalizeURI(hit['extract_referer']['extract_uri']) + hit['extract_referer']['extract_parameters'] = self._normalizeParameters(hit['extract_referer']['extract_parameters']) return True def _decodeTime(self, hit): @@ -817,7 +819,7 @@ if __name__ == '__main__': default='INFO', type=str, help='Loglevel in %s, default : %s' % (['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'], 'INFO')) - parser.add_argument('-r', '--reset', dest='reset', action='store_true', + parser.add_argument('-r', '--reset', dest='reset', default=False, help='Reset analysis to a specific date (month/year)')