Skip to content

Commit

Permalink
Merge pull request #844 from mandiant/cyberchef-taskbar
Browse files Browse the repository at this point in the history
Create Pinnable CyberChef that uses Chrome
  • Loading branch information
Ana06 authored Jan 18, 2024
2 parents e2972ae + b3313ba commit c01de4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/cyberchef.vm/cyberchef.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>cyberchef.vm</id>
<version>10.5.2.20230823</version>
<version>10.5.2.20240117</version>
<authors>GCHQ</authors>
<description>The Cyber Swiss Army Knife - a web app for encryption, encoding, compression, data analysis, and more.</description>
<dependencies>
<dependency id="common.vm" />
<dependency id="googlechrome.vm" />
</dependencies>
</metadata>
</package>
14 changes: 11 additions & 3 deletions packages/cyberchef.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ try {
VM-Remove-PreviousZipPackage ${Env:chocolateyPackageFolder}

$category = 'Utilities'
$toolName = 'CyberChef'
$shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category
$toolDir = Join-Path ${Env:RAW_TOOLS_DIR} 'cyberchef'
$toolDir = Join-Path ${Env:RAW_TOOLS_DIR} $toolName

$packageArgs = @{
packageName = ${Env:ChocolateyPackageName}
Expand All @@ -18,9 +19,16 @@ try {
Install-ChocolateyZipPackage @packageArgs
VM-Assert-Path $toolDir

$shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category
$shortcut = Join-Path $shortcutDir "$toolName.lnk"
$executableCmd = Join-Path ${Env:WinDir} "system32\cmd.exe" -Resolve
$htmlPath = Join-Path $toolDir "CyberChef_v10.5.2.html" -Resolve
$shortcut = Join-Path $shortcutDir "CyberChef.lnk"
Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $htmlPath
$arguments = "start chrome $htmlPath && exit"
$executableArgs = "/C $arguments"
$iconLocation = "%ProgramFiles%\Google\Chrome\Application\chrome.exe"

Install-ChocolateyShortcut -ShortcutFilePath $shortcut -TargetPath $executableCmd -Arguments $executableArgs -WorkingDirectory $toolDir -WindowStyle 7 -IconLocation $iconLocation

VM-Assert-Path $shortcut
} catch {
VM-Write-Log-Exception $_
Expand Down

0 comments on commit c01de4d

Please sign in to comment.