-
-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Description
I'm trying to make a script where i can detect if password is wrong, but exit code is always 0.
Is there a way to change exit code if login failed for any reason?
you can try it too with a simple script (i test on a mikrotik device, hence the weird command):
@echo off
:loop
echo.
echo.
set /P "pwd=Enter password: "
if "%pwd%" == "end" goto :end
klink -auto-store-sshkey -batch -ssh -pw "%pwd%" admin@192.168.88.1 "/beep frequency=500 length=0.5"
echo exit code: %errorlevel%
echo.
echo.
timeout 3 >nul
goto :loop
:end
pauseStenthal
Metadata
Metadata
Assignees
Labels
No labels
