Skip to content

Commit

Permalink
Add onenoteanalyzer.vm
Browse files Browse the repository at this point in the history
  • Loading branch information
d35ha committed Dec 21, 2023
1 parent 599b523 commit 7341e25
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/onenoteanalyzer.vm/onenoteanalyzer.vm.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>onenoteanalyzer.vm</id>
<version>0.0.0.20231221</version>
<authors>neeraj</authors>
<description>A C# based tool for analyzing malicious OneNote documents.</description>
<dependencies>
<dependency id="common.vm" />
</dependencies>
</metadata>
</package>
27 changes: 27 additions & 0 deletions packages/onenoteanalyzer.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking

try {

$toolName = 'OneNoteAnalyzer'
$category = 'Office'

$toolDir = Join-Path ${Env:RAW_TOOLS_DIR} $toolName
$zipUrl = 'https://github.com/knight0x07/OneNoteAnalyzer/releases/download/OneNoteAnalyzer/OneNoteAnalyzer-withPass.zip'
$zipSha256 = 'a8b04313cf73360b828624a423435b2f2b4652a16c421170b2400966e6ac77cc'

$packageArgs = @{
packageName = ${Env:ChocolateyPackageName}
unzipLocation = $toolDir
url = $zipUrl
checksum = $zipSha256
checksumType = 'sha256'
}
Install-ChocolateyZipPackage @packageArgs
VM-Assert-Path $toolDir

$executablePath = Join-Path $toolDir "OneNoteAnalyzer-withPass\OneNoteAnalyzer_withPass.exe" -Resolve
VM-Install-Shortcut -toolName $toolName -category $category -executablePath $executablePath -consoleApp $true -arguments "--help"
} catch {
VM-Write-Log-Exception $_
}
8 changes: 8 additions & 0 deletions packages/onenoteanalyzer.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$ErrorActionPreference = 'Continue'
Import-Module vm.common -Force -DisableNameChecking

$toolName = 'OneNoteAnalyzer'
$category = 'Office'

VM-Remove-Tool-Shortcut $toolName $category
VM-Uninstall $toolName $category

0 comments on commit 7341e25

Please sign in to comment.