#!/bin/bash # secure-overwrite-files - Securely overwrite files with encrypted random data # ⚠️ WARNING: THIS PERMANENTLY DESTROYS DATA - USE WITH EXTREME CAUTION # # Usage: # secure-overwrite-files --dry-run /path/to/files # See what would happen # secure-overwrite-files /path/to/files # Actually overwrite set -euo pipefail # Detect WSL and set compatibility flags IS_WSL=false if grep -qiE '(microsoft|wsl)' /proc/version 2>/dev/null || [ -n "${WSL_DISTRO_NAME:-}" ]; then IS_WSL=true fi # Colors for warnings RED='\033[0;31m' YELLOW='\033[1;33m' GREEN='\033[0;32m' NC='\033[0m' # No Color # Configuration DRY_RUN=false TARGET_DIR="" # Parse arguments while [[ $# -gt 0 ]]; do case $1 in --dry-run) DRY_RUN=true shift ;; --help|-h) cat <