-
Notifications
You must be signed in to change notification settings - Fork 70
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 lighthouse IDA Pro plugin #911
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
packages/ida.plugin.lighthouse.vm/ida.plugin.lighthouse.vm.nuspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>ida.plugin.lighthouse.vm</id> | ||
<version>0.9.3</version> | ||
<description>Lighthouse is a powerful code coverage explorer for IDA Pro and Binary Ninja, providing software researchers with uniquely interactive controls to study execution maps for native applications without requiring symbols or source.</description> | ||
<authors>gaasedelen</authors> | ||
<dependencies> | ||
<dependency id="common.vm" /> | ||
<dependency id="libraries.python3.vm" version="0.0.0.20230927" /> | ||
</dependencies> | ||
</metadata> | ||
</package> |
50 changes: 50 additions & 0 deletions
50
packages/ida.plugin.lighthouse.vm/tools/chocolateyinstall.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
$ErrorActionPreference = 'Stop' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
try { | ||
# Download the plugin | ||
$toolName = "lighthouse" | ||
$toolVersion = "0.9.3" | ||
$toolDir = Join-Path ${Env:chocolateyPackageFolder} "temp_$([guid]::NewGuid())" | ||
$toolUrl = "https://github.com/gaasedelen/lighthouse/archive/refs/tags/v0.9.3.zip" | ||
$toolSha256 = "b9f1888827f68d69672d1202783b47f7603fb80f42f9b70edeb9349d40c4f33c" | ||
$packageArgs = | ||
@{ | ||
packageName = ${Env:ChocolateyPackageName} | ||
unzipLocation = $toolDir | ||
url = $toolUrl | ||
checksum = $toolSha256 | ||
checksumType = "sha256" | ||
} | ||
Install-ChocolateyZipPackage @packageArgs | ||
|
||
# Install the plugin | ||
$pluginsDir = New-Item "$Env:APPDATA\Hex-Rays\IDA Pro\plugins" -ItemType "directory" -Force | ||
$pluginFile = Join-Path $toolDir "$toolName-$toolVersion\plugins\lighthouse_plugin.py" -Resolve | ||
$pluginDir = Join-Path $toolDir "$toolName-$toolVersion\plugins\lighthouse" -Resolve | ||
Copy-Item $pluginFile -Destination $pluginsDir -Force | ||
Copy-Item $pluginDir -Destination $pluginsDir -Force -Recurse | ||
|
||
# Remove the temp installation folder | ||
Remove-Item $toolDir -Recurse | ||
|
||
# Install the code coverage binaries | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add to the comment why they are needed |
||
$toolName = "CodeCoverage" | ||
$zipUrl = "https://github.com/gaasedelen/lighthouse/releases/download/v$toolVersion/CodeCoverage-v$toolVersion-98830.zip" | ||
$zipSha256 = "5b3e9659e934f8d7f4751cc0e20aa76de28822bc4f28b4936aa9be9c9e108595" | ||
|
||
$toolDir = Join-Path ${Env:RAW_TOOLS_DIR} $toolName | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need this in |
||
|
||
# Download and unzip | ||
$packageArgs = @{ | ||
packageName = $toolName | ||
unzipLocation = $toolDir | ||
url = $zipUrl | ||
checksum = $zipSha256 | ||
checksumType = "sha256" | ||
} | ||
Install-ChocolateyZipPackage @packageArgs | ||
VM-Assert-Path $toolDir | ||
} catch { | ||
VM-Write-Log-Exception $_ | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/ida.plugin.lighthouse.vm/tools/chocolateyuninstall.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
$ErrorActionPreference = 'Continue' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
$pluginsDir = "$Env:APPDATA\Hex-Rays\IDA Pro\plugins" | ||
|
||
# Uninstall plugin | ||
$pluginFile = Join-Path $pluginsDir "lighthouse_plugin.py" | ||
$pluginDir = Join-Path $pluginsDir "lighthouse" | ||
Remove-Item $pluginFile | ||
Remove-Item $pluginDir -Recurse | ||
|
||
# Uninstall the code coverage binaries | ||
$toolName = "CodeCoverage" | ||
$toolDir = Join-Path ${Env:RAW_TOOLS_DIR} $toolName | ||
Remove-Item $toolDir -Recurse |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Use
$pluginsDir
directly as unzip location instead of downloading to%TEMP%
and copying items over