Get-keys.bat

:: Write CSV header set "CSV_HDR=File,LineNumber,Context,MatchType,MatchValue" if "%DRY%"=="0" ( echo %CSV_HDR%> "%OUTFILE%" )

:: -------------------------- :: Patterns to look for :: As batch lacks regex, we use findstr with /r and some heuristics :: -------------------------- REM Common patterns (simplified): REM - AWS Access Key ID: AKIA followed by 16 alphanumerics REM - AWS Secret Access Key: 40 base64-like chars (heuristic) REM - Google API key: "AIza" followed by 35 chars REM - JWT-like: three base64url segments separated by dots, present in a line REM - UUIDs: 8-4-4-4-12 hex pattern REM - Generic tokens: long alphanumeric strings >= 20 chars REM - Private key headers: -----BEGIN PRIVATE KEY----- get-keys.bat

popd