doctorlinux commited on
Commit
ff0ba6d
·
verified ·
1 Parent(s): db5b15b

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -31,7 +31,8 @@ FORBIDDEN_KEYWORDS = [
31
  "reverse shell", "sqlmap", "chmod", "chown", "exec "
32
  ]
33
  FORBIDDEN_CMDLIKE = ["curl ", "wget ", "sudo ", "bash -i", "nc ", "ncat ", "rm -rf"]
34
- FORBIDDEN_SUBSTR = ["$(", "${", "\x", "base64 -d"]
 
35
  FORBIDDEN_HEX_RE = re.compile(r"0x[0-9a-fA-F]{2,}") # compilar por separado, simple y seguro
36
 
37
  def contains_forbidden(text: str) -> bool:
 
31
  "reverse shell", "sqlmap", "chmod", "chown", "exec "
32
  ]
33
  FORBIDDEN_CMDLIKE = ["curl ", "wget ", "sudo ", "bash -i", "nc ", "ncat ", "rm -rf"]
34
+ # OJO: usar \\x aquí para que el archivo final contenga \x y no sea interpretado como escape por Python
35
+ FORBIDDEN_SUBSTR = ["$(", "${", "\\x", "base64 -d"]
36
  FORBIDDEN_HEX_RE = re.compile(r"0x[0-9a-fA-F]{2,}") # compilar por separado, simple y seguro
37
 
38
  def contains_forbidden(text: str) -> bool: