Solvedhashcat Hashcat 4.1.0 Windows PATH Bug
✔️Accepted Answer
I did a workaround for this. Maybe could be useful to somebody. I'll explain it.
-
First I added haschat dir to the PATH environment (remember to close cmd prompt and reopen it after modifying PATH env var to get new changes working). After doing this, I can run
hashcat64.exe -V
from anywhere but If I launchhashcat -b -m 0 -D 1 --force
to test it is still failing saying./hashcat.hctune: No such file or directory
. -
Then I created on my hashcat directory (in my case is
C:\Program Files\hashcat-5.1.0
) a file calledhashcat.bat
. The content of the file is this:
@echo off
set original_dir="%CD%"
cd "C:\Program Files\hashcat-5.1.0"
hashcat64.exe %*
cd "%original_dir%"
The orgininal_dir
var is set in order to return to the same directory where you are once launched. Otherwise it will change always our cmd prompt to hashcat directory. Remember that on the third line of the bat, the path that must be appear is where you have your hashcat (the same dir you added to the PATH env var, in my case is C:\Program Files\hashcat-5.1.0
).
- Last step, just test it! Execute from anywhere
hashcat -b -m 0 -D 1 --force
<- this command execute the minimal benchmark test using CPU.
This worked for me on hashcat 5.1.0 for Windows (W10).
Other Answers:
I'd like to leave my bit of help here for people having the same issue by extending @OscarAkaElvis' answer.
While it was really helpful, provided batch file wont return to the same directory if hashcat is located in another drive.
You can further modify that script by handling directory changes between different disks as such:
@echo off
set original_dir=%CD%
D:
cd "D:\sec\hashcat-5.1.0"
hashcat64.exe %*
cd "%original_dir%"
for /f "tokens=1 delims=\\" %%G IN ("%original_dir%") DO %%G
I have the hashcat-4.1.0 directory extracted into the root of the C: drive on a PC (C:\hashcat-4.1.0) and have the Windows PATH set to include this folder.
The machine is running 64bit Windows 10 Pro.
I tried calling the hashcat64 binary from another folder through command prompt or powershell e.g.
C:\example>hashcat64 -a 3 -m 10.....
However, I get this error:
./hashcat.hctune: No such file or directory
I have confirmed that this file is in fact present within the hashcat-4.1.0 directory. This issue does not exist with hashcat-4.0.1
Hope that helps!