From 2bc0e5c70134370aee27846f213d1117e82393f2 Mon Sep 17 00:00:00 2001 From: d35ha Date: Thu, 21 Dec 2023 09:24:29 +0100 Subject: [PATCH] Add onedump.vm --- packages/onedump.vm/onedump.vm.nuspec | 13 +++++++++++++ .../onedump.vm/tools/chocolateyinstall.ps1 | 18 ++++++++++++++++++ .../onedump.vm/tools/chocolateyuninstall.ps1 | 9 +++++++++ 3 files changed, 40 insertions(+) create mode 100644 packages/onedump.vm/onedump.vm.nuspec create mode 100644 packages/onedump.vm/tools/chocolateyinstall.ps1 create mode 100644 packages/onedump.vm/tools/chocolateyuninstall.ps1 diff --git a/packages/onedump.vm/onedump.vm.nuspec b/packages/onedump.vm/onedump.vm.nuspec new file mode 100644 index 00000000..82560938 --- /dev/null +++ b/packages/onedump.vm/onedump.vm.nuspec @@ -0,0 +1,13 @@ + + + + onedump.vm + 0.0.2 + Didier Stevens + Dump tool for onenote files. + + + + + + diff --git a/packages/onedump.vm/tools/chocolateyinstall.ps1 b/packages/onedump.vm/tools/chocolateyinstall.ps1 new file mode 100644 index 00000000..27b15623 --- /dev/null +++ b/packages/onedump.vm/tools/chocolateyinstall.ps1 @@ -0,0 +1,18 @@ +$ErrorActionPreference = 'Stop' +Import-Module vm.common -Force -DisableNameChecking + +try { + + $toolName = 'OneDump' + $category = 'Office' + + $scriptUrl = 'https://raw.githubusercontent.com/DidierStevens/Beta/963ba003c7326a83130ee070796866deab55d882/onedump.py' + $scriptDir = Join-Path ${Env:TOOL_LIST_DIR} $category + $scriptPath = Join-Path $scriptDir "$toolName.py" + + New-Item -ItemType Directory -Force -Path $scriptDir + Invoke-WebRequest $scriptUrl -OutFile $scriptPath + VM-Assert-Path $scriptPath +} catch { + VM-Write-Log-Exception $_ +} diff --git a/packages/onedump.vm/tools/chocolateyuninstall.ps1 b/packages/onedump.vm/tools/chocolateyuninstall.ps1 new file mode 100644 index 00000000..e604c627 --- /dev/null +++ b/packages/onedump.vm/tools/chocolateyuninstall.ps1 @@ -0,0 +1,9 @@ +$ErrorActionPreference = 'Continue' + +$toolName = 'OneDump' +$category = 'Office' + +$scriptDir = Join-Path ${Env:TOOL_LIST_DIR} $category +$scriptPath = Join-Path $scriptDir "$toolName.py" + +Remove-Item $scriptPath -Force -ea 0 | Out-Null