send_input
Send text input to active interactive sessions (msfconsole, SSH, shell) to execute commands and interact with long-running processes.
Instructions
Send text input to any active interactive session (msfconsole, SSH, mysql, python REPL, shell, etc.). This is a generic primitive that works with ANY session type managed by the backend — it is not limited to Metasploit.
Use this together with read_output() to have a full interactive conversation with a long-running process:
Start a session (e.g. via msf_session_create or zebbern_exec with background=True)
send_input(session_id, "some command\n")
read_output(session_id) to collect the response
Args: session_id: The session identifier returned when the session was created. input_text: The text to send to the session's stdin. Include a trailing newline (\n) if the target process expects one. session_type: Hint for the backend on how to handle the session. 'auto' (default) lets the backend detect the type. Other values: 'msfconsole', 'ssh', 'shell', 'mysql', 'python'.
Returns: dict with at minimum: - success (bool): whether the input was accepted - session_id (str): echo of the session targeted - error (str, optional): present only on failure
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_text | Yes | ||
| session_id | Yes | ||
| session_type | No | auto |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |