Re: Buffer Size Command Hanging - WeOnlyDo Discussion board

Re: Buffer Size Command Hanging (General questions)

by mmorton, Wednesday, July 08, 2009, 11:54 (5618 days ago) @ wodDamir

The code I am currently using is.

[code]
sshConnection.Execute( show * /identifier & vbCrLf, vbCrLf, 30)
Dim data_retrieve As Boolean = True
While data_retrieve
Dim line_data As String = sshConnection.WaitFor( regex:UAF>| & vbCrLf, 30)
If line_data.Contains( [ ) And line_data.Contains( ] ) Then
passwd.Add(line_data.Replace( , ))
Else
If line_data.Contains( UAF> ) Then data_retrieve = False
End If
End While
[/code]

I tried to use the following:

[code]
sshConnection.Blocking = False
sshConnection.Send( show * /identifier & vbCrLf)
While sshConnection.DataReady
Dim line_data As String = sshConnection.RecieveLine()
If line_data.Contains( [ ) And line_data.Contains( ] ) Then passwd.Add(line_data.Replace( , ))
End While
[/code]

But this code doesnt retrieve all the rows. It retrieves about 2000-3000 and produces different amounts each time. As the server has pauses in the output I had to start trying to use waitfor.

I am expecting 9874 rows.

Regards
Mike


Complete thread: