linted code

This commit is contained in:
Lorenzo Venerandi
2026-02-17 13:13:06 +01:00
parent 2c7b612587
commit c023d808c6
8 changed files with 65 additions and 34 deletions

View File

@@ -2,4 +2,4 @@
"""
FastAPI middleware package for the Krawl honeypot.
"""
"""

View File

@@ -26,4 +26,4 @@ class BanCheckMiddleware(BaseHTTPMiddleware):
return Response(status_code=500)
response = await call_next(request)
return response
return response

View File

@@ -59,8 +59,20 @@ class DeceptionMiddleware(BaseHTTPMiddleware):
elif any(
pattern in full_input
for pattern in [
"cmd=", "exec=", "command=", "execute=", "system=",
";", "|", "&&", "whoami", "id", "uname", "cat", "ls", "pwd",
"cmd=",
"exec=",
"command=",
"execute=",
"system=",
";",
"|",
"&&",
"whoami",
"id",
"uname",
"cat",
"ls",
"pwd",
]
):
attack_type_log = "COMMAND_INJECTION"
@@ -87,4 +99,4 @@ class DeceptionMiddleware(BaseHTTPMiddleware):
)
response = await call_next(request)
return response
return response