From 588a3d641d0224232715bdf7ca85b737237b74f0 Mon Sep 17 00:00:00 2001 From: d35ha Date: Wed, 21 Feb 2024 11:01:48 +0100 Subject: [PATCH] Add ida.plugin.sigmaker.vm --- .../ida.plugin.sigmaker.vm.nuspec | 12 ++++++++++ .../tools/chocolateyinstall.ps1 | 24 +++++++++++++++++++ .../tools/chocolateyuninstall.ps1 | 8 +++++++ 3 files changed, 44 insertions(+) create mode 100644 packages/ida.plugin.sigmaker.vm/ida.plugin.sigmaker.vm.nuspec create mode 100644 packages/ida.plugin.sigmaker.vm/tools/chocolateyinstall.ps1 create mode 100644 packages/ida.plugin.sigmaker.vm/tools/chocolateyuninstall.ps1 diff --git a/packages/ida.plugin.sigmaker.vm/ida.plugin.sigmaker.vm.nuspec b/packages/ida.plugin.sigmaker.vm/ida.plugin.sigmaker.vm.nuspec new file mode 100644 index 000000000..edab96c0c --- /dev/null +++ b/packages/ida.plugin.sigmaker.vm/ida.plugin.sigmaker.vm.nuspec @@ -0,0 +1,12 @@ + + + + ida.plugin.sigmaker.vm + 1.0.0 + Signature Maker Plugin for IDA Pro 8.3. + A200K + + + + + diff --git a/packages/ida.plugin.sigmaker.vm/tools/chocolateyinstall.ps1 b/packages/ida.plugin.sigmaker.vm/tools/chocolateyinstall.ps1 new file mode 100644 index 000000000..062a6b57e --- /dev/null +++ b/packages/ida.plugin.sigmaker.vm/tools/chocolateyinstall.ps1 @@ -0,0 +1,24 @@ +$ErrorActionPreference = 'Stop' +Import-Module vm.common -Force -DisableNameChecking + +try { + # Download the plugin + $pluginUrl = "https://github.com/A200K/IDA-Pro-SigMaker/releases/download/v1.0.0/SigMaker64.dll" + $pluginPath = Join-Path ${Env:TEMP} "SigMaker.dll" + $pluginSha256 = "D8D14721515B1473408D21C40A1F223E18D402647B78F97B685E1A534C184402" + $packageArgs = @{ + packageName = ${Env:ChocolateyPackageName} + url = $pluginUrl + checksum = $pluginSha256 + checksumType = "sha256" + fileFullPath = $pluginPath + } + Get-ChocolateyWebFile @packageArgs + VM-Assert-Path $pluginPath + + # Install the plugin + $pluginsDir = New-Item "$Env:APPDATA\Hex-Rays\IDA Pro\plugins" -ItemType "directory" -Force + Move-Item $pluginPath -Destination $pluginsDir -Force +} catch { + VM-Write-Log-Exception $_ +} diff --git a/packages/ida.plugin.sigmaker.vm/tools/chocolateyuninstall.ps1 b/packages/ida.plugin.sigmaker.vm/tools/chocolateyuninstall.ps1 new file mode 100644 index 000000000..40b917789 --- /dev/null +++ b/packages/ida.plugin.sigmaker.vm/tools/chocolateyuninstall.ps1 @@ -0,0 +1,8 @@ +$ErrorActionPreference = 'Continue' +Import-Module vm.common -Force -DisableNameChecking + +$pluginsDir = "$Env:APPDATA\Hex-Rays\IDA Pro\plugins" + +# Uninstall plugin +$pluginPath = Join-Path $pluginsDir "SigMaker.dll" +Remove-Item $pluginPath -Force