2610.9
This commit is contained in:
1 parent
6775f7c9fd
commit
8210047eb1
1 file changed
+2
-2
+2
-2
@@ -443,7 +443,7 @@ for line in sys.stdin:
|
|||||||
src = str(e.get("src_ip", "?"))
|
src = str(e.get("src_ip", "?"))
|
||||||
dst = str(e.get("dst_port", "?"))
|
dst = str(e.get("dst_port", "?"))
|
||||||
local_ts = ts.astimezone().strftime("%Y-%m-%d %H:%M:%S")
|
local_ts = ts.astimezone().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
out.append(f" {local_ts:<34} {src:<18} {dst}")
|
out.append(f" {local_ts:<34} {src:<18} {dst}")
|
||||||
if not out:
|
if not out:
|
||||||
out.append(" (no events in the last hour)")
|
out.append(" (no events in the last hour)")
|
||||||
while len(out) < 5:
|
while len(out) < 5:
|
||||||
@@ -453,7 +453,7 @@ print("\n".join(out))
|
|||||||
}
|
}
|
||||||
|
|
||||||
log_columns() {
|
log_columns() {
|
||||||
printf " %-34s %-18s%s\n" " Timestamp" "Source IP" " Destination Port"
|
printf " %-34s %-18s%s\n" " Timestamp" " Source IP" " Destination Port"
|
||||||
printf " %s %s %s\n" " ──────────────────────────────────" "──────────────────" "──────────────────"
|
printf " %s %s %s\n" " ──────────────────────────────────" "──────────────────" "──────────────────"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user