Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 2.09 KB

README.md

File metadata and controls

58 lines (40 loc) · 2.09 KB

Shell command logger (scl)

PyPI version License Python versions

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. It is also provided in the docs folder and can be locally viewed by following these steps:

  1. Install development dependencies (only required once):
    python3 -m pip install -r requirements-dev.txt
  2. Building the documentation and starting a local webserver:
    mkdocs serve
  3. Open localhost:8000

Installation

Install via pip:

pip install shell-command-logger[full]

Usage

To record a command, you just prefix it with scl log:

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 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)