Files
reverse-skills-max/vendor-new/analyst-ai-pack/skills/hashing-and-fingerprinting-files/references/api-reference.md

1.3 KiB

API Reference: Hashing and Fingerprinting Files

Overview

scripts/analyst.py computes MD5/SHA-1/SHA-256 with stdlib hashlib, adds PE imphash and per-section SHA-256 when pefile is present, and includes ssdeep/TLSH fuzzy hashes when their libraries are installed. It reads inert bytes and never executes the sample.

Dependencies

Package Version Purpose
(stdlib) — hashlib cryptographic hashes
pefile >= 2023.2.7 imphash and section hashing (optional)
ssdeep >= 3.4 Fuzzy/context-triggered piecewise hashing (optional)
python-tlsh >= 4.5 Locality-sensitive similarity hashing (optional)

Core functions

crypto_hashes(data)

Returns MD5, SHA-1, SHA-256, and size.

pe_hashes(path)

Returns imphash and per-section SHA-256 for PE files.

fuzzy_hashes(data)

Returns ssdeep/TLSH digests when available.

Usage

python scripts/analyst.py hash sample.bin

Sources