install.ps1
Invokes PowerShell HTTP request cmdletAuthenticode script signature block context
SHA-256a0e9c60dda24d484810f7865350d3c8a5c6642044a3eb16fb7c3f6a6ad7d9727
MaleculeH₇(Cm₅Cr₂Db₅F₆OsPoU₃)Md₂
Evidence
1#!/usr/bin/env pwsh
2
3# Proton Pass CLI Installation Script for Windows
4# Usage: Invoke-WebRequest -Uri https://proton.me/download/pass-cli/install.ps1 -OutFile install.ps1; .\install.ps1
5# Or with custom install dir: $env:PROTON_PASS_CLI_INSTALL_DIR="C:\custom\path"; .\install.ps1
6# Or with custom channel: $env:PROTON_PASS_CLI_INSTALL_CHANNEL="beta"; .\install.ps1
7
8$ErrorActionPreference = "Stop"
9
10$MANIFEST_BASE_URL = "https://proton.me/download/pass-cli/"
11$BINARY_NAME = "pass-cli.exe"
12
13# Get manifest URL based on channel
14function Get-ManifestUrl {
15 $channel = $env:PROTON_ …
31:6… or output functions
32function Write-Info {
33 param([string]$Message)
34 Write-Host "[INFO] $Message" -ForegroundColor Green
35}
36
37function Write-Warn {
38 param([string]$Message)
39 Write-Host "[WARN] $Message" -ForegroundColor Yellow
40}
41
42function Write-Error-Custom {
43 param([string]$Message)
44 Write-Host "[ERROR] $Message" -ForegroundColor Red
45}
46
47# Detect architecture
48function Get-Architecture {
49 $arch = [System.Environment]::GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")
50
51 switch ($arch) {
52 "AMD64" { return "x86_64" }
53 "x86_64" { return "x86_64" …
66:32… st from $MANIFEST_URL..."
67
68 try {
69 $response = Invoke-WebRequest -Uri $MANIFEST_URL -UseBasicParsing
70 $manifest = $response.Content | ConvertFrom-Json
71 }
72 catch {
73 Write-Error-Custom "Failed to download manifest from $MANIFEST_URL"
74 Wr …
83:5… Write-Error-Custom "Manifest content preview: $($manifest | ConvertTo-Json -Depth 1)"
84 exit 1
85 }
⋯5 lines
128:12… nfo "Downloading binary from $Url..."
129
130 try {
131 Invoke-WebRequest -Uri $Url -OutFile $TempFile -UseBasicParsing
132 }
133 catch {
134 Write-Error-Custom "Failed to download binary from $Url"
135 Write …