Get-keys.bat May 2026

REM findstr in Windows supports limited regex; some syntax above may not be portable. REM We'll use simpler multiple findstr searches per pattern below.

set "OUTFILE=%CD%\get-keys_report_%DT%.csv" get-keys.bat

:: parse other args set "EXTS=txt,env,conf,config,json,js,py,java,xml,ini,yml,yaml,md,log" set "EXCLUDE=.git;.venv;node_modules;venv" set "MASK=0" set "DRY=0" REM findstr in Windows supports limited regex; some

:: -------------------------- :: Main scan loop :: -------------------------- pushd "%ROOT%" 2>nul || (echo Cannot access %ROOT% & exit /b 1) log" set "EXCLUDE=.git

popd

call :mask_value "%MATCHVAL%" set "OUTVAL=%MASKED_VALUE%" REM Quote fields for CSV, replace quotes inside fields set "QFILE=%%~fF" set "QLINE=%LN%" set "QCTX=%L%" REM escape double quotes by doubling them set "QFILE=%QFILE:"=""%" set "QCTX=%QCTX:"=""%" if "%DRY%"=="0" ( >>"%OUTFILE%" echo "%QFILE%","%QLINE%","%QCTX%","%MT%","%OUTVAL%" ) echo Found [%MT%] in %%~fF:%LN% -> %OUTVAL% ) ) ) )