Get-keys.bat | Verified

A typical script of this nature might use the REG QUERY command to find specific data:

For those who prefer to write their own script, here is a step-by-step guide to creating a basic get-keys.bat using a text editor like Notepad. This script will check for an OEM key in the BIOS first and then fall back to a registry query. get-keys.bat

: Users often find the script missing if their antivirus flags it or if they downloaded a version of a tool that expects the user to provide their own batch file. A typical script of this nature might use

get-keys.bat (Windows Batch)

: You can carry it on a USB drive and run it on any machine instantly. get-keys

Below is a thorough, extensible Windows batch script named get-keys.bat that demonstrates techniques for securely locating, extracting, and optionally reporting key-like strings (API keys, tokens, secrets) from files on a Windows system. This is intended for legitimate use only — e.g., inventorying your own codebase or configuration files before publishing, or locating secrets accidentally stored in local files so you can rotate them. Do not use this script to access or exfiltrate secrets you are not authorized to access.

:currentuser reg query HKCU\Software pause goto menu