diff --git a/packages/didier-stevens-suite.vm/didier-stevens-suite.vm.nuspec b/packages/didier-stevens-suite.vm/didier-stevens-suite.vm.nuspec new file mode 100644 index 000000000..321b5c52d --- /dev/null +++ b/packages/didier-stevens-suite.vm/didier-stevens-suite.vm.nuspec @@ -0,0 +1,13 @@ + + + + didier-stevens-suite.vm + 0.0.0.20230928 + Didier Stevens + Tools colection by Didier Stevens + + + + + + diff --git a/packages/didier-stevens-suite.vm/tools/chocolateyinstall.ps1 b/packages/didier-stevens-suite.vm/tools/chocolateyinstall.ps1 new file mode 100644 index 000000000..89c95e1db --- /dev/null +++ b/packages/didier-stevens-suite.vm/tools/chocolateyinstall.ps1 @@ -0,0 +1,27 @@ +$ErrorActionPreference = 'Stop' +Import-Module vm.common -Force -DisableNameChecking + +try { + $category = 'PDF' + $zipUrl = 'https://github.com/DidierStevens/DidierStevensSuite/archive/8190354314d6f42c9ddc477a795029dc446176c5.zip' + $zipSha256 = 'fe37ef5b81810af99820a7360aa26e7fec669432875dd29e38f307880bb53c37' + + $packageArgs = @{ + packageName = ${Env:ChocolateyPackageName} + unzipLocation = ${Env:RAW_TOOLS_DIR} + url = $zipUrl + checksum = $zipSha256 + checksumType = 'sha256' + } + Install-ChocolateyZipPackage @packageArgs + $toolDir = Get-Item "${Env:RAW_TOOLS_DIR}\DidierStevensSuite-*" + VM-Assert-Path $toolDir + + # Add shortcut for commonly used PDF tools + ForEach ($toolName in @('pdfid', 'pdf-parser')) { + $executablePath = Join-Path $toolDir "$toolName.py" + VM-Install-Shortcut $toolName $category $executablePath -consoleApp $true + } +} catch { + VM-Write-Log-Exception $_ +} diff --git a/packages/didier-stevens-suite.vm/tools/chocolateyuninstall.ps1 b/packages/didier-stevens-suite.vm/tools/chocolateyuninstall.ps1 new file mode 100644 index 000000000..e784769de --- /dev/null +++ b/packages/didier-stevens-suite.vm/tools/chocolateyuninstall.ps1 @@ -0,0 +1,12 @@ +$ErrorActionPreference = 'Continue' +Import-Module vm.common -Force -DisableNameChecking + +# Remove shortcuts +$category = 'PDF' +ForEach ($toolName in @('pdfid', 'pdf-parser')) { + VM-Remove-Tool-Shortcut $toolName $category +} + +# Remove tool directory +$toolDir = Get-Item "${Env:RAW_TOOLS_DIR}\DidierStevensSuite-*" +Remove-Item $toolDir -Recurse -Force -ea 0