Skip to content

Commit f9c12f9

Browse files
authored
Merge pull request clong#872 from security-companion/master
Fix velociraptor download
2 parents 9ebe646 + b284c4a commit f9c12f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Vagrant/scripts/install-velociraptor.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Determining latest release of Velocir
1818
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
1919
# Disabling the progress bar speeds up IWR https://github.com/PowerShell/PowerShell/issues/2138
2020
$ProgressPreference = 'SilentlyContinue'
21-
$velociraptorDownloadUrl = "https://github.com" + ((Invoke-WebRequest "https://github.com/Velocidex/velociraptor/releases" -UseBasicParsing).links | Select-Object -ExpandProperty href | Select-String "windows-amd64.msi$" | Select-Object -First 1)
21+
# Fix issue #869: Problem is that link to windows msi is hidden behind toogle item and not accesible, therefore get link for linux and replace with windows link
22+
$velociraptorDownloadUrlLinux = "https://github.com" + ((Invoke-WebRequest "https://github.com/Velocidex/velociraptor/releases" -UseBasicParsing).links | Select-Object -ExpandProperty href | Select-String "linux-amd64$" | Select-Object -First 1)
23+
$velociraptorDownloadUrl = $velociraptorDownloadUrlLinux.replace("linux-amd64", "windows-amd64.msi")
24+
Write-Host "Downloading Velociraptor from $velociraptorDownloadUrl"
2225
$velociraptorMSIPath = 'C:\Users\vagrant\AppData\Local\Temp\velociraptor.msi'
2326
$velociraptorLogFile = 'c:\Users\vagrant\AppData\Local\Temp\velociraptor_install.log'
2427
If (-not(Test-Path $velociraptorLogFile) -or ($Update -eq $true)) {

0 commit comments

Comments
 (0)