can we report

This commit is contained in:
n.diaz
2024-11-25 20:01:02 +01:00
parent 621f46dd7a
commit 1c9605940c

View File

@ -67,11 +67,11 @@ def report_attacks():
) )
hosts = {} hosts = {}
for a in Attack.select(): for a in Attack.select():
# print(a.host)
if a.host in hosts: if a.host in hosts:
hosts[a.host] = hosts[a.host] + 1 hosts[a.host] = hosts[a.host] + 1
else: else:
hosts[a.host] = 1 hosts[a.host] = 1
print(a.host)
sorted_hosts = dict(sorted(hosts.items(), key=lambda x:x[1])) sorted_hosts = dict(sorted(hosts.items(), key=lambda x:x[1]))