MCPcopy
hub / github.com/t3l3machus/hoaxshell / inspect_command

Method inspect_command

hoaxshell.py:321–333  ·  view source on GitHub ↗
(os, cmd)

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.45

Tested by

no test coverage detected