carrotsh
A simple and lightweight server that allows clients to connect and launch a shell remotely through a browser. Uses xterm.js for the frontend.
Requirements
- node.js
- npm
- python
- python-cryptography
Installation & Usage
# Clone the repository
git clone https://github.com/AnnikaV9/carrotsh.git
# Change the working directory
cd carrotsh
# Install the dependencies
npm install
# Edit the configuration file
vim config.json
# Set the server password
python3 setpass.py
# Start the server and listen at the default port: 6060
node index.js
Configuration
carrotsh uses config.json as the primary configuration file.
Available options:
- port: The port the server should listen on. (Default: 6060)
- shell: Path to the shell executable. (Default:
/bin/bash
) - shell_timeout: The max age (ms) of the spawned shell session. (Default: 3600000)
- python_path: Path to your python interpreter. (Default:
/usr/bin/python3
) - salt: The password hashing salt. Please change the default value. After changing, make sure to run setpass.py again to generate a new hash. (Default: carrots)
- https: Set as
true
to enable TLS/SSL. (Default:false
) - https_options
- path_to_cert: Path to your certificate file. (Default:
./cert.pem
) - path_to_key: Path to your key file. (Default:
./key.pem
)
Contributing
Feel like something can be improved? Found a bug? Open an issue!
Want to contribute directly? Just make a pull request!
GitHub - AnnikaV9/carrotsh at pythonawesome.com
A simple and lightweight server that allows clients to connect and launch a shell remotely through a browser. - GitHub - AnnikaV9/carrotsh at pythonawesome.com