Re: Cant Telnet to Cisco equipment (General questions)
Johnny,
I think this should work:
[code]
...
wodSSH1.StripANSI = True
wodSSH1.Connect
Dim a,b,wodSSH1
wodSSH1.WaitFor ( regex:[$ #>] $ )
wodSSH1.DataReady = 0
wodSSH1.Send ls -al | more + vbLf
b = CStr(wodSSH1.WaitFor( --More-- ))
On Error Resume Next
wodSSH1.Timeout = 10
Do
wodSSH1.Send ( + vbLf)
a = CStr(wodSSH1.WaitFor( --More-- ))
If Err.Number <> 0 Then
a =
End If
b = b + a
Loop Until Len(a) = 0
b = b + wodSSH1.Receive 'receive rest
Wscript.Echo(b)
[/code]
Let us know how it goes.
Drazen