I was wondering if you guys have a suggestion for a better way of cycling through password.
My current script always hang at the if statement.
Here is my code:
prompt = "A:"
currentTab = crt.GetScriptTab()
password = ["wrongPass", "rightPass"]
x = 0
currentTab.Screen.Synchronous = True
while currentTab.Screen.WaitForString("assword:") == True:
if currentTab.Screen.WaitForString(prompt) == True:
x = x + 1
Here is my output:
MINOR: CLI Unidentified command.
Type "exit" to return to CLI.
As you can see the right password was enter on the second try. However, the script will hang at the waitforstring(prompt) line of code and never send the "finished" string. It is waiting for "A:" but we already log into the kernel and it doesn't go to the else statement to break out of the while loop.