Do a lot of things
This commit is contained in:
@@ -20,6 +20,7 @@ class IWLAPostAnalysisReverseDNS(IPlugin):
|
||||
try:
|
||||
name, _, _ = socket.gethostbyaddr(k)
|
||||
hit['remote_addr'] = name
|
||||
hit['dns_name_replaced'] = True
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
|
||||
@@ -9,7 +9,7 @@ class IWLAPostAnalysisTopVisitors(IPlugin):
|
||||
def hook(self, iwla):
|
||||
hits = iwla.getValidVisitors()
|
||||
stats = iwla.getMonthStats()
|
||||
top_bandwidth = [(k,hits[k]['bandwidth']) for (k,v) in hits.items()]
|
||||
top_bandwidth = [(k,hits[k]['bandwidth']) for k in hits.keys()]
|
||||
top_bandwidth = sorted(top_bandwidth, key=lambda t: t[1], reverse=True)
|
||||
stats['top_visitors'] = [hits[h[0]] for h in top_bandwidth[:10]]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user