Command Line Interface
You're about to really reinvent the wheel now that you are making a CLI and you were already using Metasploit for this, but hey, whatever. Think about what you liked from that and just copy it.
There are 1000s of dev hours of work you can do to copy the features of Metasploit, but let's focus on the most important parts.
- Method of listing all available sessions, including displaying when a new session checks in
- Method to select a specific session
- Method to send a task to the listening post that sends a command or commands to a session (Writing all the different commands you find you will need will take forever. Try to stick with figuring out aliases for built in Linux commands that can get you the information you want in the format you want)
- Display output of a session's response to a task