From d37662eafb52bfdb1ee68f9999fff1690944a1e9 Mon Sep 17 00:00:00 2001 From: Marco Ochse Date: Tue, 14 Feb 2023 17:51:53 +0100 Subject: [PATCH] Return port no. instead of "OTHER" if unknown. --- DataServer_v2.py | 7 +++++-- index.html | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/DataServer_v2.py b/DataServer_v2.py index 3d84964..5ecfb42 100644 --- a/DataServer_v2.py +++ b/DataServer_v2.py @@ -448,7 +448,10 @@ def process_data(hit): except: alert["ip_rep"] = "reputation unknown" if not alert["src_ip"] == "": - alert["color"] = service_rgb[alert["protocol"].upper()] + try: + alert["color"] = service_rgb[alert["protocol"].upper()] + except: + alert["color"] = service_rgb["OTHER"] return alert else: print("SRC IP EMPTY") @@ -488,7 +491,7 @@ def port_to_type(port): if port == 5555: return "ADB" else: - return "OTHER" + return str(port) except: return "OTHER" diff --git a/index.html b/index.html index f8b606c..3051c1c 100644 --- a/index.html +++ b/index.html @@ -156,7 +156,7 @@ - + @@ -171,7 +171,7 @@
HitlistHits IP
- + @@ -186,7 +186,7 @@
HitlistHits Country
- +
Realtime EventsEvents IP Country