Compare commits

...

13 Commits
v1.35 ... v1.44

Author SHA1 Message Date
Pete Batard
425eb4da24 Prevent Fido from running on non Windows platforms
* Per #58, we consider that letting non-Windows users run Fido is going to become
  too much of liability moving forward, so the script now detects non Windows
  platforms and actively prevent itself from running there.
* Closes #60.
* Also some whitespace cleanup.
2023-03-07 12:16:57 +00:00
Pete Batard
10acbf9f84 Improve error handling
* Simplify regex and fix unconverted characters.
* Also use Start-BitsTransfer for cmdline downloads (Closes #56).
* Also remove -DisableProgress now that we use Start-BitsTransfer.
2023-02-06 01:22:02 +00:00
Pete Batard
4b24ae5795 Fix Windows 7 detection
* Of course, Windows 7's PowerShell is too stupid to actually compare Version objects.
2023-01-27 15:12:02 +00:00
Pete Batard
2ca0f62f53 Fix language regexp and force TLS for Windows 8.x
* Non En locales may still return '<select id="product-languages">' instead of
  '<select id="product-languages" ...>' so make sure we account for that case.
* Addresses pbatard/rufus#2148
* Also force TLS for Windows 8.x to address pbatard/rufus#2133
2023-01-27 13:39:13 +00:00
Pete Batard
448cfa72cf Remove Windows 7 support
* "I'm sorry for your loss. Move on."
2023-01-27 13:28:28 +00:00
Pete Batard
9552df66d5 Update language option regexp to match latest Microsoft HTML fragment
* Addresses pbatard/rufus#2146
* Also update .gitattributes to clean up release archives
2023-01-25 20:04:14 +00:00
Pete Batard
4bafb688da Remove unneeded files
* .whitesource is unneeded because we don't use external dependencies.
* VS project files are unneeded when we just edit the .ps1 in a text editor.
2023-01-11 20:22:13 +00:00
Pete Batard
ad79094c30 Improve error handling and reporting when querying vlscppe.microsoft.com
* Also use a better default icon and add a preemptive localized message for
  future countermeasures from Microsoft.
2023-01-09 17:32:59 +00:00
Pete Batard
8cf4a279ff Work around Microsoft's new ISO download countermeasures
* The Microsoft servers now use session Id whitelisting, so add querying
  of https://vlscppe.microsoft.com/tags with the session Id.
* Closes #52.
* Also harmonize/improve -replace calls
* Also make sure we use POST for the getskuinformationbyproductedition
  query (in case Microsoft add some more countermeasures).
* Also drop 'cmd /c' invocation in sign.sh since the cygwin people can't
  seem to get their act together there...
2023-01-08 22:10:01 +00:00
Pete Batard
84f833b067 Improve error reporting
* Now return the error message from the Microsoft server where possible (See #52)
2023-01-06 21:58:20 +00:00
Pete Batard
c34a41fe3f Add UEFI Shell 2.2 22H2 download 2022-12-15 00:20:19 +00:00
Erik Dansbo
6593585ff3 Add an option to disable progress report for commandline
* Closes #50
2022-12-14 17:11:09 +00:00
Pete Batard
fac4c49262 Add Windows 10 22H2 builds
* And remove Windows 11 22H2 *v0* builds since Microsoft removed the ISOs from their servers
2022-10-19 13:48:03 +01:00
7 changed files with 122 additions and 148 deletions

View File

@@ -2,7 +2,8 @@
root = true
[*]
trim_trailing_whitespace = true
insert_final_newline = true
# Must use a BOM else Unicode strings will not display
charset = utf-8-bom
insert_final_newline = true
indent_style = tab
trim_trailing_whitespace = true

3
.gitattributes vendored
View File

@@ -1,3 +1,6 @@
* text=auto
*.ps1 eol=crlf
*.sh eol=lf
.gitattributes export-ignore
.gitignore export-ignore
sign.sh export-ignore

View File

@@ -1,8 +0,0 @@
{
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}

192
Fido.ps1
View File

@@ -1,6 +1,6 @@
#
# Fido v1.35 - Feature ISO Downloader, for retail Windows images and UEFI Shell
# Copyright © 2019-2022 Pete Batard <pete@akeo.ie>
# Fido v1.44 - Feature ISO Downloader, for retail Windows images and UEFI Shell
# Copyright © 2019-2023 Pete Batard <pete@akeo.ie>
# Command line support: Copyright © 2021 flx5
# ConvertTo-ImageSource: Copyright © 2016 Chris Carter
#
@@ -24,7 +24,7 @@
#region Parameters
param(
# (Optional) The title to display on the application window.
[string]$AppTitle = "Fido - Retail Windows ISO Downloader",
[string]$AppTitle = "Fido - Feature ISO Downloader",
# (Optional) '|' separated UI localization strings.
[string]$LocData,
# (Optional) Path to a file that should be used for the UI icon.
@@ -58,6 +58,28 @@ if ($Win -or $Rel -or $Ed -or $Lang -or $Arch -or $GetUrl) {
$Cmd = $True
}
# Return a decimal Windows version that we can then check for platform support.
# Note that because we don't want to have to support this script on anything
# other than Windows, this call returns 0.0 for PowerShell running on Linux/Mac.
function Get-Platform-Version()
{
$version = 0.0
$platform = [string][System.Environment]::OSVersion.Platform
# This will filter out non Windows platforms
if ($platform.StartsWith("Win")) {
# Craft a decimal numeric version of Windows
$version = [System.Environment]::OSVersion.Version.Major * 1.0 + [System.Environment]::OSVersion.Version.Minor * 0.1
}
return $version
}
$winver = Get-Platform-Version
# The default TLS for Windows 8.x doesn't work with Microsoft's servers so we must force it
if ($winver -lt 10.0) {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12
}
#region Assembly Types
$code = @"
[DllImport("shell32.dll", CharSet = CharSet.Auto, SetLastError = true, BestFitMapping = false, ThrowOnUnmappableChar = true)]
@@ -103,11 +125,6 @@ $WindowsVersions = @(
@("Windows 11 Home/Pro/Edu", 2370),
@("Windows 11 Home China ", ($zh + 2371))
),
@(
"22H2 (Build 22621.382 - 2022.09)",
@("Windows 11 Home/Pro/Edu", 2360),
@("Windows 11 Home China ", ($zh + 2361))
),
@(
"21H2 v1 (Build 22000.318 - 2021.11)",
@("Windows 11 Home/Pro/Edu", 2093),
@@ -121,12 +138,11 @@ $WindowsVersions = @(
),
@(
@("Windows 10", "Windows10ISO"),
# Not yet enabled by Microsoft...
# @(
# "22H2 (Build 1904?.???? - 2022.10)",
# @("Windows 10 Home/Pro/Edu", 2377),
# @("Windows 10 Home China ", ($zh + 2378))
# ),
@(
"22H2 (Build 19045.2006 - 2022.10)",
@("Windows 10 Home/Pro/Edu", 2377),
@("Windows 10 Home China ", ($zh + 2378))
),
@(
"21H2 (Build 19044.1288 - 2021.11)",
@("Windows 10 Home/Pro/Edu", 2084),
@@ -290,6 +306,11 @@ $WindowsVersions = @(
),
@(
@("UEFI Shell 2.2", "UEFI_SHELL 2.2"),
@(
"22H2 (edk2-stable202211)",
@("Release", 0),
@("Debug", 1)
),
@(
"22H1 (edk2-stable202205)",
@("Release", 0),
@@ -312,7 +333,7 @@ $WindowsVersions = @(
)
),
@(
@("UEFI Shell 2.0", "UEFI_SHELL 2.0"),
@("UEFI Shell 2.0", "UEFI_SHELL 2.0"),
@(
"4.632 [20100426]",
@("Release", 0)
@@ -498,7 +519,7 @@ function ConvertTo-ImageSource
function Throw-Error([object]$Req, [string]$Alt)
{
$Err = $(GetElementById -Request $r -Id "errorModalMessage").innerText
$Err = $(GetElementById -Request $Req -Id "errorModalMessage").innerText -replace "<[^>]+>" -replace "\s+", " "
if (-not $Err) {
$Err = $Alt
} else {
@@ -601,7 +622,7 @@ $RequestData["GetLangs"] = @("a8f8f489-4c7f-463a-9ca6-5cff94d8d041", "getskuinfo
# This GUID applies to visitors of the en-US download page. Other locales may get a different GUID.
$RequestData["GetLinks"] = @("6e2a1789-ef16-4f27-a296-74ef7ef5d96b", "GetProductDownloadLinksBySku" )
# Create a semi-random Linux User-Agent string
$FirefoxVersion = Get-Random -Minimum 50 -Maximum 90
$FirefoxVersion = Get-Random -Minimum 90 -Maximum 110
$FirefoxDate = Get-RandomDate
$UserAgent = "Mozilla/5.0 (X11; Linux i586; rv:$FirefoxVersion.0) Gecko/$FirefoxDate Firefox/$FirefoxVersion.0"
$Verbosity = 2
@@ -616,30 +637,25 @@ if ($Cmd) {
# Localization
$EnglishMessages = "en-US|Version|Release|Edition|Language|Architecture|Download|Continue|Back|Close|Cancel|Error|Please wait...|" +
"Download using a browser|Temporarily banned by Microsoft for requesting too many downloads - Please try again later...|" +
"PowerShell 3.0 or later is required to run this script.|Do you want to go online and download it?"
"Download using a browser|Download of Windows ISOs is unavailable due to Microsoft having altered their website to prevent it.|" +
"PowerShell 3.0 or later is required to run this script.|Do you want to go online and download it?|" +
"This feature is not available on this platform."
[string[]]$English = $EnglishMessages.Split('|')
[string[]]$Localized = $null
if ($LocData -and (-not $LocData.StartsWith("en-US"))) {
$Localized = $LocData.Split('|')
if ($Localized.Length -ne $English.Length) {
Write-Host "Error: Missing or extra translated messages provided ($($Localized.Length)/$($English.Length))"
exit 101
# Adjust the $Localized array if we have more or fewer strings than in $EnglishMessages
if ($Localized.Length -lt $English.Length) {
while ($Localized.Length -ne $English.Length) {
$Localized += $English[$Localized.Length]
}
} elseif ($Localized.Length -gt $English.Length) {
$Localized = $LocData.Split('|')[0..($English.Length - 1)]
}
$Locale = $Localized[0]
}
$QueryLocale = $Locale
# Make sure PowerShell 3.0 or later is used (for Invoke-WebRequest)
if ($PSVersionTable.PSVersion.Major -lt 3) {
Write-Host Error: PowerShell 3.0 or later is required to run this script.
$Msg = "$(Get-Translation($English[15]))`n$(Get-Translation($English[16]))"
if ([System.Windows.MessageBox]::Show($Msg, $(Get-Translation("Error")), "YesNo", "Error") -eq "Yes") {
Start-Process -FilePath https://www.microsoft.com/download/details.aspx?id=34595
}
exit 102
}
# Convert a size in bytes to a human readable string
function Size-To-Human-Readable([uint64]$size)
{
@@ -653,7 +669,8 @@ function Size-To-Human-Readable([uint64]$size)
}
# Check if the locale we want is available - Fall back to en-US otherwise
function Check-Locale {
function Check-Locale
{
try {
$url = "https://www.microsoft.com/" + $QueryLocale + "/software-download/"
if ($Verbosity -ge 2) {
@@ -709,6 +726,17 @@ function Get-Windows-Languages([int]$SelectedVersion, [int]$SelectedEdition)
} elseif ($WindowsVersions[$SelectedVersion][0][1].StartsWith("UEFI_SHELL")) {
$languages += @(New-Object PsObject -Property @{ DisplayLanguage = "English (US)"; Language = "en-us"; Id = 0 })
} else {
# Microsoft download protection now requires the sessionId to be whitelisted through vlscppe.microsoft.com/tags
$url = "https://vlscppe.microsoft.com/tags?org_id=y6jn8c31&session_id=" + $SessionId
if ($Verbosity -ge 2) {
Write-Host Querying $url
}
try {
Invoke-WebRequest -UseBasicParsing -MaximumRedirection 0 -UserAgent $UserAgent $url | Out-Null
} catch {
Error($_.Exception.Message)
return @()
}
$url = "https://www.microsoft.com/" + $QueryLocale + "/api/controls/contentinclude/html"
$url += "?pageId=" + $RequestData["GetLangs"][0]
$url += "&host=www.microsoft.com"
@@ -723,11 +751,12 @@ function Get-Windows-Languages([int]$SelectedVersion, [int]$SelectedEdition)
$script:SelectedIndex = 0
try {
$r = Invoke-WebRequest -UseBasicParsing -UserAgent $UserAgent -SessionVariable "Session" $url
$r = Invoke-WebRequest -Method Post -UseBasicParsing -UserAgent $UserAgent -SessionVariable "Session" $url
if ($r -match "errorModalMessage") {
Throw-Error -Req $r -Alt "Could not retrieve languages from server"
}
$pattern = '(?s)<select id="product-languages">(.*)?</select>'
$r = $r -replace "`n" -replace "`r"
$pattern = '.*<select id="product-languages"[^>]*>(.*)</select>.*'
$html = [regex]::Match($r, $pattern).Groups[1].Value
# Go through an XML conversion to keep all PowerShells happy...
$html = $html.Replace("selected value", "value")
@@ -778,7 +807,7 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
$xml = New-Object System.Xml.XmlDocument
if ($Verbosity -ge 2) {
Write-Host Querying $url
}
}
$xml.Load($url)
$sep = ""
$archs = ""
@@ -810,20 +839,17 @@ function Get-Windows-Download-Links([int]$SelectedVersion, [int]$SelectedRelease
try {
$Is64 = [Environment]::Is64BitOperatingSystem
# Must add a referer for POST requests, else Microsoft's servers will deny them
# Must add a referer for this request, else Microsoft's servers will deny it
$ref = "https://www.microsoft.com/software-download/windows11"
$wr = [System.Net.WebRequest]::Create($url)
# Windows 7 PowerShell doesn't support 'Invoke-WebRequest -Headers @{"Referer" = $ref}'
# (produces "The 'Referer' header must be modified using the appropriate property or method")
# so we use StreamReader() with GetResponseStream() and do this whole gymkhana instead...
$wr.Method = "POST"
$wr.Referer = $ref
$wr.UserAgent = $UserAgent
$wr.ContentLength = 0
$sr = New-Object System.IO.StreamReader($wr.GetResponse().GetResponseStream())
$r = $sr.ReadToEnd()
$r = Invoke-WebRequest -Method Post -Headers @{ "Referer" = $ref } -UseBasicParsing -UserAgent $UserAgent -WebSession $Session $url
if ($r -match "errorModalMessage") {
Throw-Error -Req $r -Alt "Could not retrieve architectures from server"
$Alt = [regex]::Match($r, '<p id="errorModalMessage">(.+?)<\/p>').Groups[1].Value -replace "<[^>]+>" -replace "\s+", " " -replace "\?\?\?", "-"
if (-not $Alt) {
$Alt = "Could not retrieve architectures from server"
} else {
$Alt += " " + $SessionId + "."
}
Throw-Error -Req $r -Alt $Alt
}
$pattern = '(?s)(<input.*?></input>)'
ForEach-Object { [regex]::Matches($r, $pattern) } | ForEach-Object { $html += $_.Groups[1].value }
@@ -871,7 +897,7 @@ function Process-Download-Link([string]$Url)
$tmp_size = [uint64]::Parse($str_size)
$Size = Size-To-Human-Readable $tmp_size
Write-Host "Downloading '$File' ($Size)..."
Invoke-WebRequest -UseBasicParsing -Uri $Url -OutFile $File
Start-BitsTransfer -Source $Url -Destination $File
} else {
Write-Host Download Link: $Url
Start-Process -FilePath $Url
@@ -892,6 +918,12 @@ if ($Cmd) {
$winLanguageName = $null
$winLink = $null
# Windows 7 and non Windows platforms are too much of a liability
if ($winver -le 6.1) {
Error(Get-Translation("This feature is not available on this platform."))
exit 403
}
$i = 0
$Selected = ""
if ($Win -eq "List") {
@@ -952,7 +984,7 @@ if ($Cmd) {
if (!$Ed -and $Verbosity -ge 1) {
Write-Host "No edition specified (-Ed). Defaulting to '$($edition.Edition)'."
}
$Selected += "," + $edition.Edition -replace "Windows [0-9\.]*", ""
$Selected += "," + $edition.Edition -replace "Windows [0-9\.]*"
$winEditionId = $edition.Id
break;
}
@@ -1050,7 +1082,7 @@ $XMLForm.Title = $AppTitle
if ($Icon) {
$XMLForm.Icon = $Icon
} else {
$XMLForm.Icon = [Gui.Utils]::ExtractIcon("shell32.dll", -41, $true) | ConvertTo-ImageSource
$XMLForm.Icon = [Gui.Utils]::ExtractIcon("imageres.dll", -5205, $true) | ConvertTo-ImageSource
}
if ($Locale.StartsWith("ar") -or $Locale.StartsWith("fa") -or $Locale.StartsWith("he")) {
$XMLForm.FlowDirection = "RightToLeft"
@@ -1059,6 +1091,12 @@ $WindowsVersionTitle.Text = Get-Translation("Version")
$Continue.Content = Get-Translation("Continue")
$Back.Content = Get-Translation("Close")
# Windows 7 and non Windows platforms are too much of a liability
if ($winver -le 6.1) {
Error(Get-Translation("This feature is not available on this platform."))
exit 403
}
# Populate the Windows versions
$i = 0
$versions = @()
@@ -1188,8 +1226,8 @@ exit $ExitCode
# SIG # Begin signature block
# MIIkWQYJKoZIhvcNAQcCoIIkSjCCJEYCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBY/5IAG/GViBcd
# 1JTY1vmyD3aBIuP9LO6GCK/ojLlAlKCCElkwggVvMIIEV6ADAgECAhBI/JO0YFWU
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDCpZpntjuU2uHY
# z3/0OsY2UtUKjz1UjCN6T8dRzpny96CCElkwggVvMIIEV6ADAgECAhBI/JO0YFWU
# jTanyYqJ1pQWMA0GCSqGSIb3DQEBDAUAMHsxCzAJBgNVBAYTAkdCMRswGQYDVQQI
# DBJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoM
# EUNvbW9kbyBDQSBMaW1pdGVkMSEwHwYDVQQDDBhBQUEgQ2VydGlmaWNhdGUgU2Vy
@@ -1292,23 +1330,23 @@ exit $ExitCode
# aWMgQ29kZSBTaWduaW5nIENBIEVWIFIzNgIRAL+xUAG79ZLUlip3l+pzb6MwDQYJ
# YIZIAWUDBAIBBQCgfDAQBgorBgEEAYI3AgEMMQIwADAZBgkqhkiG9w0BCQMxDAYK
# KwYBBAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvB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MSIEIBi+xZssYhAdmjF0gLXZv2WCNOM3iW02zqjWyiHi
# 3ZVhMDcGCyqGSIb3DQEJEAIvMSgwJjAkMCIEIMR0znYAfQI5Tg2l5N58FMaA+eKC
# ATz+9lPvXbcf32H4MAsGCSqGSIb3DQEBAQSCAQAQ/Kq0P6rLFJ66lXNqtLxRuZtB
# MUMdYUhBiKy3RCJwf1SMi4nhV/aHEw43hQz+GsxrxENwy24VFfxOg6kguqI1Qm0b
# w5+rCqFykHUntTAsIND27MthzzXn69wkoFv0n2IKjq05KuUEXgEy+eemStG1G0tU
# efXWl2eFR+8ItErCzAi7Dt7R76vhRG7Sj1Ik2PlltdnK0+SuSdLfeVbTrrYQ2Kub
# ueVJWMFFE4CX0LvFJ6fdytVVqTD8GXNj/bdt2La5zLEobYoQXHzXwJHXGY+Nj9d8
# 5fiYgMP7RA04944Xjkoc761EySwFWPHNJjg8DTSAz+NKrnFdvb9K3hoik1wT
# SIG # End signature block

View File

@@ -1,35 +0,0 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>6CAFC0C6-A428-4d30-A9F9-700E829FEA51</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Fido</RootNamespace>
<AssemblyName>Fido</AssemblyName>
<Name>Frida</Name>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup />
<ItemGroup>
<Compile Include="Fido.ps1" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="Build" />
<Import Project="$(MSBuildExtensionsPath)\PowerShell Tools for Visual Studio\PowerShellTools.targets" Condition="Exists('$(MSBuildExtensionsPath)\PowerShell Tools for Visual Studio\PowerShellTools.targets')" />
</Project>

View File

@@ -1,25 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.271
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F5034706-568F-408A-B7B3-4D38C6DB8A32}") = "Fido", "Fido.pssproj", "{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AD54CEAE-0992-4213-BEDB-8F1CF98A9F22}
EndGlobalSection
EndGlobal

View File

@@ -21,7 +21,7 @@ sign_file() {
}
# Update the Authenticode signature
cmd.exe /c '"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool" sign /v /sha1 3dbc3a2a0e9ce8803b422cfdbc60acd33164965d /fd SHA256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 Fido.ps1'
MSYS2_ARG_CONV_EXCL='*' "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool" sign /v /sha1 3dbc3a2a0e9ce8803b422cfdbc60acd33164965d /fd SHA256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 Fido.ps1
read -s -p "Enter pass phrase for `realpath $PRIVATE_KEY`: " PASSWORD
echo
# Confirm that the pass phrase is valid by trying to sign a dummy file