-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
$ErrorActionPreference = 'Stop' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
$toolName = 'WinDump' | ||
$category = 'Networking' | ||
|
||
$zipUrl = 'https://github.com/hsluoyz/WinDump/releases/download/v0.3/WinDump-for-Npcap-0.3.zip' | ||
$zipSha256 = '7ed45fb06c8c9731ef095db627eaca23b445b2809041e164996121e49b24f5d4' | ||
|
||
try { | ||
$toolDir = Join-Path ${Env:RAW_TOOLS_DIR} $toolName | ||
|
||
# Remove files from previous zips for upgrade | ||
VM-Remove-PreviousZipPackage ${Env:chocolateyPackageFolder} | ||
|
||
# Download and unzip | ||
$packageArgs = @{ | ||
packageName = ${Env:ChocolateyPackageName} | ||
unzipLocation = $toolDir | ||
url = $zipUrl | ||
checksum = $zipSha256 | ||
checksumType = 'sha256' | ||
url64bit = $zipUrl | ||
checksum64 = $zipSha256 | ||
} | ||
Install-ChocolateyZipPackage @packageArgs | ||
VM-Assert-Path $toolDir | ||
|
||
if ($env:PROCESSOR_ARCHITECTURE -eq "x86") { | ||
$executablePath = Join-Path $toolDir "\x86\$toolName.exe" -Resolve | ||
} else { | ||
$executablePath = Join-Path $toolDir "\x64\$toolName.exe" -Resolve | ||
} | ||
|
||
VM-Install-Shortcut -toolName $toolName -category $category -executablePath $executablePath -consoleApp $true | ||
Install-BinFile -Name $toolName -Path $executablePath | ||
} catch { | ||
VM-Write-Log-Exception $_ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$ErrorActionPreference = 'Continue' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
$toolName = 'WinDump' | ||
$category = 'Networking' | ||
|
||
VM-Uninstall $toolName $category |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||
<metadata> | ||
<id>windump.vm</id> | ||
<version>0.3</version> | ||
<authors>Riverbed Technology and hsluoyz</authors> | ||
<description>Windows version of tcpdump, the command line network analyzer for UNIX</description> | ||
<dependencies> | ||
<dependency id="common.vm" /> | ||
<dependency id="npcap.vm" /> | ||
</dependencies> | ||
</metadata> | ||
</package> |