Skip to content

Commit

Permalink
Fix the 7z command as 7zip is not a valid command (#877)
Browse files Browse the repository at this point in the history
* Fix the 7z command as 7zip is not a valid command
* Remove hashcat intel check as per #892
  • Loading branch information
rethinksec authored Feb 14, 2024
1 parent 201a848 commit e1c6d22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
4 changes: 2 additions & 2 deletions packages/hashcat.vm/hashcat.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>hashcat.vm</id>
<version>6.2.6</version>
<version>6.2.6.20240208</version>
<authors>Jens Steube (jsteube)</authors>
<description>Hashcat is a fast password recovery utility.</description>
<dependencies>
<dependency id="common.vm" />
<dependency id="7zip-15-05.vm"/>
<dependency id="7zip-15-05.vm" version="15.05.0.20231220"/>
</dependencies>
</metadata>
</package>
18 changes: 2 additions & 16 deletions packages/hashcat.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ $toolDir = Join-Path ${Env:RAW_TOOLS_DIR} "$toolName"
$workingDir = Join-Path "$toolDir" "$zipname"

try {

# Get the processor information
$processor = Get-CimInstance Win32_Processor


# Check if the manufacturer is Intel
if ($processor.Manufacturer -eq "GenuineIntel") {
Write-Output "Intel processor detected for hashcat."
} else {
Write-Output "Non-Intel processor detected. Hashcat will not work"
throw "Non-Intel processor detected."
}


# Download the zip file
$packageArgs = @{
packageName = ${Env:ChocolateyPackageName}
Expand All @@ -38,10 +24,10 @@ try {
$zipPath = $packageArgs.fileFullPath
VM-Assert-Path $zipPath

7zip x $zipPath -o"$toolDir" -y
7z x $zipPath -o"$toolDir" -y
# Create a shortcut
$executablePath = Join-Path "$workingDir" "$toolName.exe" -Resolve
VM-Install-Shortcut $toolName $category $executablePath -consoleApp $true -executableDir $workingDir
} catch {
VM-Write-Log-Exception $_
}
}

0 comments on commit e1c6d22

Please sign in to comment.