From e67723e58ed9f4a3cc478a7218cf29db71df36ad Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Wed, 14 Jan 2015 20:19:19 +0100 Subject: [PATCH] Fix some bugs in track_users --- plugins/display/track_users.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/display/track_users.py b/plugins/display/track_users.py index 8a27fa8..d0fe2f1 100644 --- a/plugins/display/track_users.py +++ b/plugins/display/track_users.py @@ -77,7 +77,7 @@ class IWLADisplayTrackUsers(IPlugin): for ip in self.tracked_ip: if not ip in hits.keys(): continue if 'dns_name_replaced' in hits[ip].keys(): - ip_title = '%s [%s]' % (ip, hits[ip][remote_addr]) + ip_title = '%s [%s]' % (hits[ip]['remote_addr'], ip) else: ip_title = '%s' % (ip) table.appendRow([ip_title, '']) @@ -107,6 +107,8 @@ class IWLADisplayTrackUsers(IPlugin): for ip in self.tracked_ip: if not ip in hits.keys(): continue if 'dns_name_replaced' in hits[ip].keys(): - ip = '%s [%s]' % (ip, hits[ip][remote_addr]) - table.appendRow([ip, time.asctime(hits[ip]['last_access'])]) + ip_title = '%s [%s]' % (hits[ip]['remote_addr'], ip) + else: + ip_title = ip + table.appendRow([ip_title, time.asctime(hits[ip]['last_access'])]) index.appendBlock(table)