-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the SigMaker IDA Pro plugin #913
Conversation
588a3d6
to
67f7e5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@d35ha thanks for your PRs to add IDA plugins! 😄
We can only merge PRs where the linter and test succeed. In this PR the linter is failing with:
packages\ida.plugin.sigmaker.vm\tools\chocolateyinstall.ps1 - Uses an invalid category: Set $category to a category in D:\a\VM-Packages\VM-Packages\categories.txt or exclude the package in the linter
We need to exclude packages without categories (no shortcut is created in the Tools directory) in the linter. Now we have ida.plugin.capa.vm
in the EXCLUSIONS
array. I suggest we change it by ida.plugin
, which will exclude all IDA plugins.
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
try { | ||
# Download the plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] I think this comment is not needed, as this package only download a single file and the code is IMO clear.
VM-Assert-Path $pluginPath | ||
|
||
# Install the plugin | ||
$pluginsDir = New-Item "$Env:APPDATA\Hex-Rays\IDA Pro\plugins" -ItemType "directory" -Force |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create $pluginsDir
before downloading the plugin and use $pluginPath = Join-Path $pluginsDir "SigMaker.dll"
so that you don't have to move it afterwards as we do in ida.plugin.capa.vm
.
|
||
try { | ||
# Download the plugin | ||
$pluginUrl = "https://github.com/A200K/IDA-Pro-SigMaker/releases/download/v1.0.0/SigMaker64.dll" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use consistent indentation here
$pluginsDir = "$Env:APPDATA\Hex-Rays\IDA Pro\plugins" | ||
|
||
# Uninstall plugin | ||
$pluginPath = Join-Path $pluginsDir "SigMaker.dll" | ||
Remove-Item $pluginPath -Force |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I purpose to simplify the code:
$pluginsDir = "$Env:APPDATA\Hex-Rays\IDA Pro\plugins" | |
# Uninstall plugin | |
$pluginPath = Join-Path $pluginsDir "SigMaker.dll" | |
Remove-Item $pluginPath -Force | |
$pluginPath = "$Env:APPDATA\Hex-Rays\IDA Pro\plugins\SigMaker.dll" | |
Remove-Item $pluginPath -Force |
Required by #719.