<# .SYNOPSIS Steam Depot Key Extractor (ext-keys) .DESCRIPTION Scans the local Steam installation for cached 64-hex depot decryption keys in config.vdf, formats them as depotId:key, and automatically copies the result to your clipboard. .EXAMPLE irm https://depotbox.pages.dev/ek | iex #> [CmdletBinding()] param() $ErrorActionPreference = 'SilentlyContinue' Write-Host "⚔ Steam Depot Key Extractor" -ForegroundColor Cyan Write-Host "------------------------------------------------" -ForegroundColor Gray # 1. Locate Steam Path from Registry or default folders $steamPath = (Get-ItemProperty -Path 'HKCU:\Software\Valve\Steam' -Name 'SteamPath' -ErrorAction SilentlyContinue).SteamPath if (-not $steamPath) { $possiblePaths = @( "${env:ProgramFiles(x86)}\Steam", "${env:ProgramFiles}\Steam", "C:\Program Files (x86)\Steam", "C:\Program Files\Steam" ) foreach ($p in $possiblePaths) { if (Test-Path "$p\config\config.vdf") { $steamPath = $p break } } } if (-not $steamPath -or -not (Test-Path "$steamPath\config\config.vdf")) { Write-Host "āŒ Could not locate local Steam installation config.vdf." -ForegroundColor Red return } $configPath = "$steamPath\config\config.vdf" Write-Host "šŸ“ Located Steam Config: $configPath" -ForegroundColor DarkGray # 2. Read config.vdf and extract 64-hex decryption keys $content = Get-Content -Path $configPath -Raw $pattern = '"(\d{3,10})"\s*\{[^}]*?"DecryptionKey"\s*"([a-fA-F0-9]{64})"' $regex = [regex]::new($pattern) $matches = $regex.Matches($content) if ($matches.Count -eq 0) { Write-Host "āš ļø No cached 64-hex depot keys found in config.vdf." -ForegroundColor Yellow return } $outputLines = [System.Collections.Generic.List[string]]::new() foreach ($m in $matches) { $depotId = $m.Groups[1].Value $key = $m.Groups[2].Value.ToLower() $line = "${depotId}:${key}" if (-not $outputLines.Contains($line)) { $outputLines.Add($line) } } $resultText = $outputLines -join "`n" Write-Host "`nāœ… Extracted $($outputLines.Count) Depot Decryption Keys:`n" -ForegroundColor Green Write-Host $resultText -ForegroundColor White # 3. Automatically copy formatted output to Clipboard for instant 1-click pasting try { Set-Clipboard -Value $resultText Write-Host "`nšŸ“‹ Copied all $($outputLines.Count) keys to your Clipboard!" -ForegroundColor Cyan } catch {} # 4. Optional Toast Notification try { Add-Type -AssemblyName System.Windows.Forms -ErrorAction SilentlyContinue Add-Type -AssemblyName System.Drawing -ErrorAction SilentlyContinue $notify = New-Object System.Windows.Forms.NotifyIcon $notify.Icon = [System.Drawing.SystemIcons]::Information $notify.BalloonTipIcon = [System.Windows.Forms.ToolTipIcon]::Info $notify.BalloonTipTitle = "Steam Depot Key Extractor" $notify.BalloonTipText = "Extracted $($outputLines.Count) keys to Clipboard!" $notify.Visible = $true $notify.ShowBalloonTip(4000) } catch {} Write-Host ""