Skip to main content

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)

Metadata

Release files for shell-command-logger 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shell-command-logger 0.4.1
File Size Uploaded
shell-command-logger-0.4.1.tar.gz 29.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shell-command-logger 0.4.1
File Interpreter ABI Platform
shell_command_logger-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 70.8 kB

Release files / shell-command-logger-0.4.1.tar.gz

Download URL shell-command-logger-0.4.1.tar.gz
Size 29.8 kB
Tags Source
SHA-256 checksum
How to use checksums
158f053fbf590c1e58165e46f226ef5338ca0696f8e85ff78e7ea66f64170c3e
BLAKE2b-256 checksum
How to use checksums
6ee1664b347247e673b5d586021c63e214793a126b9058baeb3f75aa92543a00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / shell_command_logger-0.4.1-py3-none-any.whl

Download URL shell_command_logger-0.4.1-py3-none-any.whl
Size 41.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7badd305ac777fdacff4ec8c443562d4f4ca49e824e2736a901ebc8ae4a02021
BLAKE2b-256 checksum
How to use checksums
d6bef95beac71bf8733ee597e406d2169c9ebda83d935f6c416f4c2da705ee6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page