From ff57e5a90a6fc5b90e1aacdca575bb7647f23202 Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Wed, 16 Nov 2022 21:12:19 +0100 Subject: [PATCH] Call pre analysis hook on display only mode --- iwla.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iwla.py b/iwla.py index 36f4812..169e32e 100755 --- a/iwla.py +++ b/iwla.py @@ -200,6 +200,10 @@ class IWLA(object): def getCurrentVisits(self): return self.current_analysis['visits'] + def getSortedCurrentVisits(self): + visits = self.current_analysis['visits'].values() + return sorted(visits, key=lambda hit: hit['last_access']) + def getValidVisitors(self): return self.valid_visitors @@ -674,14 +678,10 @@ class IWLA(object): self._generateDisplay() def _generateDayStats(self): - if args.display_only: - return + self._callPlugins(conf.PRE_HOOK_DIRECTORY) visits = self.current_analysis['visits'] cur_time = self.meta_infos['last_time'] - - self._callPlugins(conf.PRE_HOOK_DIRECTORY) - stats = self._createEmptyStats() day = cur_time.tm_mday