Skip to content

Commit

Permalink
Add onedump.vm
Browse files Browse the repository at this point in the history
  • Loading branch information
d35ha committed Dec 21, 2023
1 parent 34e2866 commit 2bc0e5c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/onedump.vm/onedump.vm.nuspec
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>onedump.vm</id>
<version>0.0.2</version>
<authors>Didier Stevens</authors>
<description>Dump tool for onenote files.</description>
<dependencies>
<dependency id="common.vm" />
<dependency id="python3.vm" />
</dependencies>
</metadata>
</package>
18 changes: 18 additions & 0 deletions packages/onedump.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -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 $_
}
9 changes: 9 additions & 0 deletions packages/onedump.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2bc0e5c

Please sign in to comment.