A lightweight command-line interface (CLI) emulator written in C++ that simulates a terminal environment with user authentication, virtual paths, and administrative privilege escalation.
- User Sessions: Basic login system that initializes a home directory and user environment.
- Admin System: Dynamic prompt change (from
[$]to[#]) upon successful password verification. - Command Dispatcher: Efficient command handling using a
std::mapof function pointers. - Environment Suite: Includes the
ec(Environment Control) set of commands for system metadata.
"help" | Displays general help information. "ec" | Shows the reference for the "ec" command class. "ecVersion" | Displays the current software version. "ecName" | Shows the name of the currently logged-in user. "ecPath" | Displays the virtual directory path. "iWannaBeAnAdmin" | Prompts for a password to grant administrative rights. "clear" | Clears the terminal screen. "exit" | Closes the emulator.
A C++ compiler (GCC, Clang, or MSVC) supporting C++11 or higher.
Open your terminal and run:
g++ -o shell_emulator C\ plus\ plus\ program.cpp
./shell_emulator
This project is open-source and available under the MIT License.