I added this but I am still getting a timeout with the discovery script
// The enable command will elevate the prompt if possible.
cli.send("enable\n")
cli.expect([/[Uu]?ser\s?[Nn]ame\s?:/, /[Pp]?assword\s?:/] as String[], smallBufferSize)
if (cli.matched() =~ /[Uu]?ser\s?[Nn]ame\s?:/) {
cli.send("${user}\n")
cli.expect("[Pp]?assword:", smallBufferSize)
}
if (cli.matched() =~ /[Pp]?assword\s?:/) {
cli.send("${pass}\n")
}
// The enable command may have changed the prompt. We've got to get it again.
prompt = "^${cli.matched().replaceAll(termClean, '').trim().replaceAll(/[.*+?^()|\[\]\\{}$]/, '\\\\$0')}"