linted code
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
|
||||
"""
|
||||
FastAPI middleware package for the Krawl honeypot.
|
||||
"""
|
||||
"""
|
||||
|
||||
@@ -26,4 +26,4 @@ class BanCheckMiddleware(BaseHTTPMiddleware):
|
||||
return Response(status_code=500)
|
||||
|
||||
response = await call_next(request)
|
||||
return response
|
||||
return response
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user