Skip to content

Commit

Permalink
Return port no. instead of "OTHER" if unknown.
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chn0m4g3 committed Feb 14, 2023
1 parent 456cff0 commit d37662e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions DataServer_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -488,7 +491,7 @@ def port_to_type(port):
if port == 5555:
return "ADB"
else:
return "OTHER"
return str(port)
except:
return "OTHER"

Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<table class='table table-condensed' id='ip-origin-table'>
<thead>
<tr>
<th style='width:20%;'>Hitlist</th>
<th style='width:20%;'>Hits</th>
<th style='width:20%;'></th>
<th style='width:60%;'>IP</th>
</tr>
Expand All @@ -171,7 +171,7 @@
<table class='table table-condensed' id='country-origin-table'>
<thead>
<tr>
<th style='width:20%;'>Hitlist</th>
<th style='width:20%;'>Hits</th>
<th style='width:20%;'></th>
<th style='width:60%;'>Country</th>
</tr>
Expand All @@ -186,7 +186,7 @@
<table class='table table-condensed' id='live-attacks-table'>
<thead>
<tr>
<th style='width:20%;'>Realtime Events</th>
<th style='width:20%;'>Events</th>
<th style='width:20%;'>IP</th>
<th style='width:10%;'></th>
<th style='width:20%;'>Country</th>
Expand Down

0 comments on commit d37662e

Please sign in to comment.