diff --git a/packages/netcat.vm/netcat.vm.nuspec b/packages/netcat.vm/netcat.vm.nuspec new file mode 100644 index 000000000..446a569d0 --- /dev/null +++ b/packages/netcat.vm/netcat.vm.nuspec @@ -0,0 +1,13 @@ + + + + netcat.vm + 1.12 + Hobbit + Netcat is a networking utility for reading from and writing to network connections using TCP or UDP. + + + + + + diff --git a/packages/netcat.vm/tools/chocolateyinstall.ps1 b/packages/netcat.vm/tools/chocolateyinstall.ps1 new file mode 100644 index 000000000..48f289173 --- /dev/null +++ b/packages/netcat.vm/tools/chocolateyinstall.ps1 @@ -0,0 +1,16 @@ +$ErrorActionPreference = 'Stop' +Import-Module vm.common -Force -DisableNameChecking + +try { + $toolName = 'nc' + $category = 'Networking' + $shimPath = '%ProgramData%\chocolatey\bin\nc.exe' + + $shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category + $shortcut = Join-Path $shortcutDir "$toolName.lnk" + $executablePath = Join-Path ${Env:ChocolateyInstall} $shimPath -Resolve + Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $executablePath -RunAsAdmin + VM-Assert-Path $shortcut +} catch { + VM-Write-Log-Exception $_ +} diff --git a/packages/netcat.vm/tools/chocolateyuninstall.ps1 b/packages/netcat.vm/tools/chocolateyuninstall.ps1 new file mode 100644 index 000000000..2f8610a43 --- /dev/null +++ b/packages/netcat.vm/tools/chocolateyuninstall.ps1 @@ -0,0 +1,7 @@ +$ErrorActionPreference = 'Continue' +Import-Module vm.common -Force -DisableNameChecking + +$toolName = 'nc' +$category = 'Networking' + +VM-Remove-Tool-Shortcut $toolName $category