Re: Cant Telnet to Cisco equipment - WeOnlyDo Discussion board

Re: Cant Telnet to Cisco equipment (General questions)

by woddrazen, Tuesday, February 05, 2008, 23:25 (6136 days ago) @ rpissm

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


Complete thread: