(os, cmd)
| 319 | |
| 320 | @staticmethod |
| 321 | def inspect_command(os, cmd): |
| 322 | |
| 323 | # Check if command includes unclosed single/double quotes or backticks OR id ends with backslash |
| 324 | if Session_Defender.has_unclosed_quotes_or_backticks(cmd): |
| 325 | return True |
| 326 | |
| 327 | cmd = cmd.strip().lower() |
| 328 | |
| 329 | # Check for common commands and binaries that start interactive sessions within shells OR prompt the user for input |
| 330 | if cmd in (Session_Defender.windows_dangerous_commands + Session_Defender.interpreters): |
| 331 | return True |
| 332 | |
| 333 | return False |
| 334 | |
| 335 | |
| 336 | @staticmethod |
no test coverage detected