From 4d4d93ad807c577911e091f1b98f4e977a9f4316 Mon Sep 17 00:00:00 2001 From: Lorenzo Venerandi Date: Sun, 22 Feb 2026 18:45:56 +0100 Subject: [PATCH] linted code --- src/routes/honeypot.py | 4 +--- src/tasks/analyze_ips.py | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/honeypot.py b/src/routes/honeypot.py index 3f57319..e4b384c 100644 --- a/src/routes/honeypot.py +++ b/src/routes/honeypot.py @@ -399,9 +399,7 @@ async def trap_page(request: Request, path: str): f"[SUSPICIOUS] {client_ip} - {user_agent[:50]} - {full_path}" ) else: - access_logger.info( - f"[REQUEST] {client_ip} - {full_path}" - ) + access_logger.info(f"[REQUEST] {client_ip} - {full_path}") # Record access unless the router dependency already handled it # (attack pattern or honeypot path → already recorded by _track_honeypot_request) diff --git a/src/tasks/analyze_ips.py b/src/tasks/analyze_ips.py index 075d04c..295cd92 100644 --- a/src/tasks/analyze_ips.py +++ b/src/tasks/analyze_ips.py @@ -119,7 +119,9 @@ def main(): for ip in ips_to_analyze: # Get full history for this IP to perform accurate analysis - ip_accesses = db_manager.get_access_logs(limit=10000, ip_filter=ip, since_minutes=1440*30) # look back up to 30 days of history for better accuracy + ip_accesses = db_manager.get_access_logs( + limit=10000, ip_filter=ip, since_minutes=1440 * 30 + ) # look back up to 30 days of history for better accuracy total_accesses_count = len(ip_accesses) if total_accesses_count <= 0: continue