This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
A collection of security/forensics scripts by Jim Clausing (SANS Internet Storm Center Handler). Scripts are standalone CLI tools — no build system, package structure, or test suite.
Python scripts are linted with pylint using the project pylintrc:
pylint <script.py>Python scripts follow this header pattern:
__description__ = 'Short description'
__author__ = 'Jim Clausing'
__version__ = 'X.Y.Z'
__date__ = 'YYYY-MM-DD'- Use
argparsewith-V/--versionflag (always present) - Version tuple pattern:
__version_info__ = (X, Y, Z)then__version__ = ".".join(map(str, __version_info__)) - Scripts flush stdout explicitly (
sys.stdout.flush()) for pipeline use - Pipe-separated values (PSV) is the preferred output format for structured data
sigs.py— Hash calculator (MD5, SHA1, SHA256, SHA512, SHA3-224, SHA3-384). Requirespysha3or Python ≥ 3.6.ficheck.py— File integrity checker. Uses&-delimited CSV database at/var/lib/ficheck/ficheck.db. Config at/etc/ficheck/ficheck.cfg. Optionally usesstatxmodule for birth time. Install viaficheck-install.sh.convert-ts-bash-history.py— Converts.bash_historyfiles (with#<epoch>timestamps) tofilename|ISO-8601|commandformat. Use-fto suppress filename column.mail_stuff.py— Email helper used by ficheck cron job.
ficheck.py operates in two modes controlled by flags:
-u(update): walks directories per config, writes new DB to/run/ficheck.db.new, moves to/var/lib/ficheck/ficheck.db-r(report): compares old vs new DB and prints additions/deletions/modifications
Config (ficheck.cfg) uses Directory= and Exclusion= keys; if a path appears in both, Exclusion= takes precedence.