Skip to content

Commit

Permalink
Merge pull request #670 from Ana06/pkg-unpacker
Browse files Browse the repository at this point in the history
Add pkg-unpacker & introduce Packers category
  • Loading branch information
Ana06 authored Oct 5, 2023
2 parents 35dc935 + cf3fe3e commit 041614b
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new_metapackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ body:
- Lateral Movement
- Networking
- Office
- Packers
- Password Attacks
- Payload Development
- PDF
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ body:
- Lateral Movement
- Networking
- Office
- Packers
- Password Attacks
- Payload Development
- PDF
Expand Down
1 change: 1 addition & 0 deletions categories.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Javascript
Lateral Movement
Networking
Office
Packers
Password Attacks
Payload Development
PDF
Expand Down
13 changes: 13 additions & 0 deletions packages/pkg-unpacker.vm/pkg-unpacker.vm.nuspec
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>pkg-unpacker.vm</id>
<version>1.0.0</version>
<authors>LockBlock-dev</authors>
<description>Unpacker for pkg applications.</description>
<dependencies>
<dependency id="common.vm" />
<dependency id="nodejs" version="[20.7.0]" />
</dependencies>
</metadata>
</package>
19 changes: 19 additions & 0 deletions packages/pkg-unpacker.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
$ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking

try {
$toolName = 'pkg-unpacker'
$category = 'Packers'
$zipUrl = 'https://github.com/LockBlock-dev/pkg-unpacker/archive/b1fd5200e1bf656dedef6817c177c8bb2dc38028.zip'
$zipSha256 = '6eed1d492d37ca3934a3bc838c2256719a3e78ccf72ce1b1ca07684519ace16c'
$powershellCommand = "Write-Output '> node unpack.js'; node unpack.js"

$toolDir = VM-Install-Raw-GitHub-Repo $toolName $category $zipUrl $zipSha256 -powershellCommand $powershellCommand

# Get absolute path as npm is not in path until Powershell is restarted
$npmPath = Join-Path ${Env:ProgramFiles} "\nodejs\npm.cmd" -Resolve
# Install tool dependencies with npm
Set-Location $toolDir; & "$npmPath" install | Out-Null
} catch {
VM-Write-Log-Exception $_
}
7 changes: 7 additions & 0 deletions packages/pkg-unpacker.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$ErrorActionPreference = 'Continue'
Import-Module vm.common -Force -DisableNameChecking

$toolName = 'pkg-unpacker'
$category = 'Packers'

VM-Uninstall $toolName $category
2 changes: 1 addition & 1 deletion packages/upx.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking

$toolName = 'upx'
$category = 'Utilities'
$category = 'Packers'

$zipUrl = "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-win32.zip"
$zipSha256 = "066c62993ce904f9f377ce849e85b77d1e2cf477d554c36c5ff89f6d3f0fa072"
Expand Down
2 changes: 1 addition & 1 deletion packages/upx.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ $ErrorActionPreference = 'Continue'
Import-Module vm.common -Force -DisableNameChecking

$toolName = 'upx'
$category = 'Utilities'
$category = 'Packers'

VM-Uninstall $toolName $category
2 changes: 1 addition & 1 deletion packages/upx.vm/upx.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>upx.vm</id>
<version>4.1.0</version>
<version>4.1.0.20230929</version>
<authors>markus-oberhumer</authors>
<description>UPX is a free, secure, portable, extendable, high-performance executable packer for several executable formats.</description>
<dependencies>
Expand Down

0 comments on commit 041614b

Please sign in to comment.