I'm trying to write a script to change password's for Hirschmann RS20 Switch.
Debug:
<W-16:03:06>users passwd user[13]
<R-16:03:06>u
<R-16:03:06>sers passwd user[13][10][13][10]Enter old password:
<W-16:03:06>public[13]
<R-16:03:06>*
<R-16:03:06>**[13][10][13][10]Incorrect Password![13][10][13][10](egvko1swvis6) (Config)#
.... but the password is right.
Script:
ReDim rgMult(5)
rgMult(1) = "Enter old password:"
rgMult(2) = "Enter new password:"
rgMult(3) = "Confirm new Password:"
rgMult(4) = "... irgendwas"
rgMult(5) = "Incorrect Password!"
cl.Log 4, "SendData '" & sCmd & "'"
cl.SendData sCmd & vbCr
iRetValPWD = cl.WaitForMultData(rgMult, , COMMAND_TIMEOUT)
cl.Log 4, "Buffer '" & cl.RxBuffer & "'"
Select Case iRetValPWD
Case 1, 2, 3, 4
' Password accepted - a valid device prompt was received back
iNumSuccess = iNumSuccess + 1
iChangePWD = iChangePWD + 1
cl.Log 4, "SendData ok"
Case 5
cl.Log 4, "Incorrect Password!"
SendCommandsMultiple = False
Exit Do
Case Else
' Unexpected response received back from device
cl.Log 4, "Did not receive expected response after sending password"
iNumErrors = iNumErrors + 1
End Select
cl.FlushRxBuffer