code linted

This commit is contained in:
Lorenzo Venerandi
2026-02-18 00:02:44 +01:00
parent cccc9cde35
commit 152682de2c
6 changed files with 17 additions and 15 deletions

View File

@@ -41,7 +41,6 @@ from deception_responses import (
from wordlists import get_wordlists
from logger import get_app_logger, get_access_logger, get_credential_logger
# --- Auto-tracking dependency ---
# Records requests that match attack patterns or honeypot trap paths.
@@ -63,6 +62,7 @@ async def _track_honeypot_request(request: Request):
if body:
import urllib.parse
decoded_body = urllib.parse.unquote(body)
attack_findings.extend(tracker.detect_attack_type(decoded_body))
@@ -401,7 +401,9 @@ async def trap_page(request: Request, path: str):
# Record access unless the router dependency already handled it
# (attack pattern or honeypot path → already recorded by _track_honeypot_request)
if not tracker.detect_attack_type(full_path) and not tracker.is_honeypot_path(full_path):
if not tracker.detect_attack_type(full_path) and not tracker.is_honeypot_path(
full_path
):
tracker.record_access(
ip=client_ip,
path=full_path,