Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/six-two/shell-command-logger
Logs command outputs
https://github.com/six-two/shell-command-logger
logging pentest python scriptreplay
Last synced: 16 days ago
JSON representation
Logs command outputs
- Host: GitHub
- URL: https://github.com/six-two/shell-command-logger
- Owner: six-two
- License: mit
- Created: 2022-03-18T14:44:25.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-13T18:25:18.000Z (over 1 year ago)
- Last Synced: 2024-11-07T08:51:09.970Z (about 2 months ago)
- Topics: logging, pentest, python, scriptreplay
- Language: Python
- Homepage: https://shell-command-logger.six-two.dev
- Size: 312 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shell command logger (scl)
[![PyPI version](https://img.shields.io/pypi/v/shell_command_logger)](https://pypi.org/project/shell_command_logger/)
![License](https://img.shields.io/pypi/l/shell_command_logger)
![Python versions](https://img.shields.io/pypi/pyversions/shell_command_logger)This program uses the linux `script` and `scriptreplay` commands to record and replay the output of any desired commands.
## Documentation
This README just contains basic usage information.
For more please consult the [documentation](https://shell-command-logger.six-two.dev/).
It is also provided in the `docs` folder and can be locally viewed by following these steps:1. Install development dependencies (only required once):
```bash
python3 -m pip install -r requirements-dev.txt
```
2. Building the documentation and starting a local webserver:
```bash
mkdocs serve
```
3. Open [localhost:8000](http://localhost:8000)## Installation
Install via `pip`:
```bash
pip install shell-command-logger[full]
```## Usage
To record a command, you just prefix it with `scl log`:
```bash
scl log ls -1 /
```You can use `scl replay` to interactively choose and replay a file.
With `scl search` you can search logged commands.
For more information see the [documentation](https://shell-command-logger.six-two.dev/) or run `scl --help`.## Known issues
- `script` does strange things to input (I think to `\r`), so you should not wrap any netcat variants (`nc`, `ncat`, `netcat`).
- `Ctrl+C` kills `scl`, even if the program you call would handle the key combination.
This is especially annoying with tools like `msfconsole`.## Notable changes
### Version 0.4.1
- By default do not attempt to deal with "unnecessary" `\r` added by script ay more. It caused too many troubles. If you want/need the old behavior, set the environment variable `SCL_STRIP_CR` to the value `1`.
- Pass `SIGINT` signals (usually triggered by `Ctrl-C`) to the process being logged instead of being interrupted -> logging things like shells should work (better)
- Removed aliases for problematic tools (msfconsole, nc, ncat, netcat)