remove llm stats

This commit is contained in:
jonas committed 2026-06-09 21:43:54 +02:00
1 parent 018316cefd
commit 1d2b8159c9
2 files changed
+8 -16

No files matched your search

+2 -2
View File
@@ -65,7 +65,7 @@ def geo(db, ip):
"INSERT OR REPLACE INTO ip_geo VALUES (?, ?, ?, ?)",
(ip, *data)
)
time.sleep(0.1)
time.sleep(0.5)
print(f"Get location for {ip} to {data[0]}")
return data
@@ -123,7 +123,7 @@ def main():
db.close()
print(f"Parsed {len(lines)} lines and added {added} events")
print(f"Parsed {len(lines) - 1} lines and added {added} events")
if __name__ == "__main__":
main()
+6 -14
View File
@@ -12,10 +12,6 @@ def bar(n, mx, width=40):
return ""
return "█" * max(1, int((n / mx) * width))
print("\n" + "═"*100)
print("🔐 SSH SECURITY INTELLIGENCE DASHBOARD")
print("═"*100)
total = db.execute("SELECT COUNT(*) FROM events").fetchone()[0]
ips = db.execute("SELECT COUNT(DISTINCT ip) FROM events").fetchone()[0]
countries = db.execute("""
@@ -23,10 +19,10 @@ SELECT COUNT(DISTINCT COALESCE(country,'Unknown'))
FROM ip_geo
""").fetchone()[0]
print(f"\n📊 EVENTS: {total} 🌐 IPS: {ips} 🌍 COUNTRIES: {countries}")
print(f"\nEvents: {total} IPs: {ips} Countries: {countries}")
print("\n" + "─"*100)
print("🔥 ATTACK TYPES")
print("Types")
print("─"*100)
types = list(db.execute("""
@@ -41,7 +37,7 @@ for t, c in types:
print(f"{t:20} {c:6} {bar(c, mx)}")
print("\n" + "─"*100)
print("🚨 TOP ATTACKING IPS")
print("Top IPs")
print("─"*100)
ips_top = list(db.execute("""
@@ -62,7 +58,7 @@ for ip, c, last, country in ips_top:
print(f"{ip:18} {c:6} {country:15} {bar(c, mx)} last={ts(last)}")
print("\n" + "─"*100)
print("🌍 COUNTRY HEATMAP")
print("Countries")
print("─"*100)
countries_rows = list(db.execute("""
@@ -95,7 +91,7 @@ for country, total_c, ip_count, last in countries_rows:
print(f"{country:25} {total_c:6} ips={ip_count:4} top={top_ip:16} {bar(total_c, mx)} last={ts(last)}")
print("\n" + "─"*100)
print("🧠 TOP USERNAMES")
print("Usernames")
print("─"*100)
users = list(db.execute("""
@@ -104,14 +100,10 @@ FROM events
WHERE user IS NOT NULL
GROUP BY user
ORDER BY c DESC
LIMIT 15
LIMIT 30
"""))
mx = max([c for _, c in users] or [1])
for u, c in users:
print(f"{u:20} {c:6} {bar(c, mx)}")
print("\n" + "═"*100)
print("✅ DONE")
print("═"*100)