# HauM CMD FiveM (cmdfivem): fixed HTTPS launcher, RSA-3072 signed release manifest. # Source must be obtained from the owner's Pages domain. No Windows history or unrelated data is deleted. $ErrorActionPreference='Stop' Set-StrictMode -Version Latest $origin='https://haum-cmd-fivem.pages.dev' $app='cmdfivem' $build='CMD_FIVEM_UNIFIED_V1_20261116' $n='4vKdjBOK5vP5mNVfBGk8Q99Kq7b/XxgM3AL2p4hbvI5flimxDCX2iZK68JnmKaLf14CZ7Z4zFCx9o8ugcZXfctjTyHHnugB3/qGq9rfSkzU4PK9sV5/2cimDh85cikWK7eI+hT6vZOwAW4FAhQx7pfAiwcskZAfmZBuyTBJKfz8NPLk7rRjILF2D/9c4BwBXf2gXQQpSBO3I0esZMfgXqkpetws7tJC8DMNL1Isj9YMfMXyhnHpC05R/SKyMnlxcZB/7D16OPQlkMcRip7oxZ1nqFnDjxJUivZiz6k2IfvceSDe1dp9Ubqq3zvxTD0/v2BmrBR7rs/j622QpOEpu40CJh0sk0hluKJNILsvwJO9PBoyYNJfs9NIREtsENjJiV6lfoTchr2DF17hVGPBVPtGnGmp2qRD3bVz4Hyaera4p16FFJTEYl0NL1xJJmPxi10ypyz5tX75EV9e6o5/maB9ClmsdfwO0SkRrGmlPiVshgesewa843Zesqz2qntwd' $e='AQAB' $session=$null try { if ($env:OS -cne 'Windows_NT') {throw 'Only Windows is supported.'} [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12 $session=Join-Path ([IO.Path]::GetTempPath()) ('HauMCmdFiveM-'+[guid]::NewGuid().ToString('N')) [void][IO.Directory]::CreateDirectory($session) $mf=Join-Path $session 'release.json';$sf=Join-Path $session 'release.sig' Invoke-WebRequest -UseBasicParsing -Uri ($origin+'/release.json') -OutFile $mf -TimeoutSec 30 Invoke-WebRequest -UseBasicParsing -Uri ($origin+'/release.sig') -OutFile $sf -TimeoutSec 30 $raw=[IO.File]::ReadAllBytes($mf) if($raw.Length -lt 20 -or $raw.Length -gt 16384){throw 'Manifest length invalid'} $sigText=[IO.File]::ReadAllText($sf).Trim() $sig=[Convert]::FromBase64String($sigText) $params=New-Object Security.Cryptography.RSAParameters $params.Modulus=[Convert]::FromBase64String($n) $params.Exponent=[Convert]::FromBase64String($e) if($params.Modulus.Length -ne 384 -or $sig.Length -ne 384){throw 'RSA size invalid'} $rsa=New-Object Security.Cryptography.RSACryptoServiceProvider(3072) try { $rsa.ImportParameters($params) if(-not $rsa.VerifyData($raw,'SHA256',$sig)){throw 'Manifest RSA signature invalid'} } finally { $rsa.Dispose() } $m=ConvertFrom-Json -InputObject ([Text.Encoding]::UTF8.GetString($raw)) if($m.schema -ne 1 -or $m.release_channel -cne 'production' -or $m.app_id -cne $app -or $m.build_id -cne $build -or $m.revision -lt 1 -or $m.exe_file -cnotmatch '^releases/[1-9][0-9]*/HauM CMD FiveM[.]exe$' -or $m.exe_file -cne ('releases/'+$m.revision+'/HauM CMD FiveM.exe') -or $m.exe_sha256 -cnotmatch '^[a-f0-9]{64}$' -or $m.exe_bytes -lt 1024 -or $m.exe_bytes -gt 26214400) {throw 'Wrong app or invalid signed manifest'} $filename='HauM CMD FiveM.exe' $exe=Join-Path $session $filename $url=$origin+'/'+([string]$m.exe_file).Replace(' ','%20') Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $exe -TimeoutSec 180 if((Get-Item -LiteralPath $exe).Length -ne [long]$m.exe_bytes){throw 'EXE size mismatch'} $sha=(Get-FileHash -LiteralPath $exe -Algorithm SHA256).Hash.ToLowerInvariant() if($sha -cne $m.exe_sha256){throw 'EXE SHA256 mismatch'} Write-Host ('[PASS] RSA signed release '+$m.revision+'; EXE SHA256 OK. Launching CMD FiveM.') -ForegroundColor Green $p=Start-Process -FilePath $exe -WorkingDirectory $session -PassThru -Wait Write-Host ('CMD FiveM exited: '+$p.ExitCode) } catch { Write-Host ('[FAIL] '+$_.Exception.Message) -ForegroundColor Red throw } finally { if($session -and (Test-Path -LiteralPath $session)){ try { Remove-Item -LiteralPath $session -Recurse -Force -ErrorAction Stop } catch { Write-Warning ('Could not clean temporary folder: '+$session) } } }