MCPcopy Create free account
hub / github.com/Fadi002/de4py / execute_command

Function execute_command

de4py/utils/shell.py:35–45  ·  view source on GitHub ↗
(command)

Source from the content-addressed store, hash-verified

33
34
35def execute_command(command):
36 try:
37 process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
38 exit_code = process.wait()
39 return exit_code
40 except FileNotFoundError as e:
41 logger.error(f"Command not found: {command}. Error: {e}")
42 return -1
43 except Exception as e:
44 logger.error(f"Execution error: {e}")
45 return -1
46
47def inject_shell(pid, bp=None):
48 pid, injector, pyshell_dll = _resolve_injector_paths(pid, bp)

Callers 3

inject_shellFunction · 0.85
stealth_inject_shellFunction · 0.85
show_consoleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected