Thursday, August 4, 2011

Check your Onboard Administrator / Virtual Connect password

If you want to check your Onboard Administrator / Virtual Connect password, or test some passwords, because you don't really remember the real good one, I modified my previous script Plink_reg.cmd to make work for you.

For this, just change line 43 to 47 in file Plink_reg.cmd (or download TestOAVCPass.zip)

Echo Reg plink %1 (%date% %time%)
Echo ----------------------------- >> %LOGFILE% 2>>&1
Echo Reg plink %1 (%date% %time%) >> %LOGFILE% 2>>&1
plink.exe -ssh -l %2 -pw %3 -batch %1 "exit" >> %LOGFILE% 2>>&1
goto :EOF

with these lines

Echo Reg plink %1 (%date% %time%)
Echo ----------------------------- >> %LOGFILE% 2>>&1
Echo Reg plink %1 (%date% %time%) %2 %3 >> %LOGFILE% 2>>&1
plink.exe -ssh -l %2 -pw %3 -batch %1 "exit" > temp.txt 2>>&1
set passok=PASSWORD_KO
type temp.txt | findstr /i denied
if errorlevel 1 set passok=PASSWORD_IN_THIS_LINE
Echo ;%date% %time%;%1;%2;%3;%passok% >> resultpass.txt
goto :EOF


For example, to test password password1,password2,password3 and password4 in oa or vc with ip address 192.1.1.100 use a file "myipass.txt" with these entries:

192.1.1.100;manager;password1
192.1.1.100;manager;password2
192.1.1.100;manager;password3
192.1.1.100;manager;password4


Run "TestOAVCPass.exe myipass.txt" then you should have result like below (here password3 is the good oa password)

;31/07/2011 12:23:07,26;192.1.1.100;manager;password1;PASSWORD_KO
;31/07/2011 12:23:10,10;192.1.1.100;manager;password2;PASSWORD_KO
;31/07/2011 12:23:11,49;192.1.1.100;manager;password3;PASSWORD_IN_THIS_LINE
;31/07/2011 12:23:13,94;192.1.1.100;manager;password4;PASSWORD_KO

No comments: