-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add didier-stevens-suite.vm and adds shortcuts for the tools pdfid and pdf-parser in the PDF category.
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
packages/didier-stevens-suite.vm/didier-stevens-suite.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>didier-stevens-suite.vm</id> | ||
<version>0.0.0.20230928</version> | ||
<authors>Didier Stevens</authors> | ||
<description>Tools colection by Didier Stevens</description> | ||
<dependencies> | ||
<dependency id="common.vm" /> | ||
<dependency id="python3" version="[3.10.0, 3.11.0)" /> | ||
</dependencies> | ||
</metadata> | ||
</package> |
27 changes: 27 additions & 0 deletions
27
packages/didier-stevens-suite.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,27 @@ | ||
$ErrorActionPreference = 'Stop' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
try { | ||
$category = 'PDF' | ||
$zipUrl = 'https://github.com/DidierStevens/DidierStevensSuite/archive/8190354314d6f42c9ddc477a795029dc446176c5.zip' | ||
$zipSha256 = 'fe37ef5b81810af99820a7360aa26e7fec669432875dd29e38f307880bb53c37' | ||
|
||
$packageArgs = @{ | ||
packageName = ${Env:ChocolateyPackageName} | ||
unzipLocation = ${Env:RAW_TOOLS_DIR} | ||
url = $zipUrl | ||
checksum = $zipSha256 | ||
checksumType = 'sha256' | ||
} | ||
Install-ChocolateyZipPackage @packageArgs | ||
$toolDir = Get-Item "${Env:RAW_TOOLS_DIR}\DidierStevensSuite-*" | ||
VM-Assert-Path $toolDir | ||
|
||
# Add shortcut for commonly used PDF tools | ||
ForEach ($toolName in @('pdfid', 'pdf-parser')) { | ||
$executablePath = Join-Path $toolDir "$toolName.py" | ||
VM-Install-Shortcut $toolName $category $executablePath -consoleApp $true | ||
} | ||
} catch { | ||
VM-Write-Log-Exception $_ | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/didier-stevens-suite.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,12 @@ | ||
$ErrorActionPreference = 'Continue' | ||
Import-Module vm.common -Force -DisableNameChecking | ||
|
||
# Remove shortcuts | ||
$category = 'PDF' | ||
ForEach ($toolName in @('pdfid', 'pdf-parser')) { | ||
VM-Remove-Tool-Shortcut $toolName $category | ||
} | ||
|
||
# Remove tool directory | ||
$toolDir = Get-Item "${Env:RAW_TOOLS_DIR}\DidierStevensSuite-*" | ||
Remove-Item $toolDir -Recurse -Force -ea 0 |