Re: Recieve problem - WeOnlyDo Discussion board

Re: Recieve problem (General questions)

by Maverick2004, Thursday, February 17, 2005, 08:24 (7221 days ago) @ wodSupport

Hi again!
I did a small sample project, where i just use dir to list everything on c:\. This produces the same result, some info
is lost. Bare in mind that i´m using Telnet protocol when
connecting to Windows not SSH. When i use SSH for connecting
to Unix hosts, i do not have this problem. Below is *all* code
from ths sample:

[code]
Private Sub Command1_Click()
Dim temp As String

With wodSSH1
.Disconnect
.HostName = hostname
.Login = username
.Password = password
.Port = 23
.Protocol = Telnet
.TerminalType = dumb
.StripANSI = True
.Blocking = True
.Connect
.WaitFor regex:[C:>] , 5
.Prompt = regex:[C:>]
End With

If wodSSH1.DataReady > 0 Then wodSSH1.Receive
wodSSH1.Execute ( dir & vbCrLf)
temp = wodSSH1.Receive
End Sub
[/code]

Below is what i get when i just use dir directly on the server:


Volume in drive C has no label.
Volume Serial Number is 44FD-F6EB

Directory of C:Documents and SettingsAdministrator

2005-02-17 08:04 <DIR> .
2005-02-17 08:04 <DIR> ..
2005-02-17 07:54 <DIR> Desktop
2005-02-10 15:31 <DIR> Favorites
2005-02-10 15:31 <DIR> My Documents
2005-02-10 15:52 <DIR> Start Menu
2005-02-10 15:57 0 Sti_Trace.log
1 File(s) 0 bytes
6 Dir(s) 15 558 885 376 bytes free

This is what i recieve back when i run the code. As you can see,
info is lost in the beginning a well as at the end:


has no label.
Volume Serial Number is 44FD-F6EB

Directory of C:Documents and SettingsAdministrator

2005-02-17 08:04 <DIR> .
2005-02-17 08:04 <DIR> ..
2005-02-17 07:54 <DIR> Desktop
2005-02-10 15:31 <DIR> Favorites
2005-02-10 15:31 <DIR> My Documents
2005-02-10 15:52 <DIR> Start Menu
2005-02-10 15:57 0 Sti_Trace.log
1 File(s) 0 bytes
6 Dir(s) 15

Any suggestions to this? I´ve tried using both tty and dumb
as terminalType, i´ve tried StripANSI=False and True, i´ve tried
RecieveLine which also loses info and i get only has no label.
instead of Volume in drive C has no label. .

Cheers!
Maverick


Complete thread: