Don't analyze referer for non viewed hits/pages

This commit is contained in:
Gregory Soutade 2024-02-15 10:55:38 +01:00
parent 0464a3d8e7
commit 9db72f41fd
2 changed files with 3 additions and 0 deletions

View File

@ -59,7 +59,9 @@ class IWLADisplayVisitorIP(IPlugin):
def processIP(self, host_name, ip):
host_name = host_name.replace(ip, 'IP')
# IPv4
ip = ip.replace('.', '-')
# IPv6
ip = ip.replace(':', '-')
host_name = host_name.replace(ip, 'IP')
ip = ip.replace('-', '')

View File

@ -136,6 +136,7 @@ class IWLAPostAnalysisReferers(IPlugin):
for r in super_hit['requests'][::-1]:
if not self.iwla.isValidForCurrentAnalysis(r): break
if not r['http_referer']: continue
if not self.iwla.hasBeenViewed(r): continue
uri = r['extract_referer']['extract_uri']
if self.own_domain_re.match(uri): continue