Fix _normalizeURI substitution. Fix _normalizeParameters. Fix -r argument
This commit is contained in:
parent
73e4b0d8a6
commit
ec0a3a52a8
8
iwla.py
8
iwla.py
|
@ -337,7 +337,7 @@ class IWLA(object):
|
||||||
|
|
||||||
def _normalizeURI(self, uri):
|
def _normalizeURI(self, uri):
|
||||||
if uri == '/': return uri
|
if uri == '/': return uri
|
||||||
uri = self.normalize_uri_final_slashes.sub('', uri)
|
uri = self.normalize_uri_final_slashes.sub('/', uri)
|
||||||
return uri
|
return uri
|
||||||
|
|
||||||
def _normalizeParameters(self, parameters):
|
def _normalizeParameters(self, parameters):
|
||||||
|
@ -367,7 +367,9 @@ class IWLA(object):
|
||||||
if hit['http_referer']:
|
if hit['http_referer']:
|
||||||
referer_groups = self.uri_re.match(hit['http_referer'])
|
referer_groups = self.uri_re.match(hit['http_referer'])
|
||||||
if referer_groups:
|
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
|
return True
|
||||||
|
|
||||||
def _decodeTime(self, hit):
|
def _decodeTime(self, hit):
|
||||||
|
@ -817,7 +819,7 @@ if __name__ == '__main__':
|
||||||
default='INFO', type=str,
|
default='INFO', type=str,
|
||||||
help='Loglevel in %s, default : %s' % (['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'], 'INFO'))
|
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,
|
default=False,
|
||||||
help='Reset analysis to a specific date (month/year)')
|
help='Reset analysis to a specific date (month/year)')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user