garbage charters in output - WeOnlyDo Discussion board

garbage charters in output (General questions)

by Kevin, Tuesday, August 17, 2010, 23:19 (5210 days ago)

I am doing this from vb6 module not a form. How do I get rid of this garbage in the output. Thanks,


[code]Sub ConnectAndExecute()

Dim sshConnection As New wodTelnetDLXCom
Dim strLogMsg as String
Dim intLastConnectionError as Integer

sshConnection.Timeout = 30 ' number of seconds before the connection gives up
sshConnection.Protocol = 2 ' 1 for telnet 2 for ssh
sshConnection.Blocking = 1 ' we always want 1 that allows us to use a password instead of a ssh key
sshConnection.Port = 22 'Port = 23 for telnet (tms5 ) 22 for ssh (tms6)
sshConnection.HostName = myServer

sshConnection.Login = myUserName
sshConnection.Password = myPassword

On Error Resume Next
sshConnection.Connect

intLastConnectionError = sshConnection.LastError

If intLastConnectionError <> 0 Then
strLogMsg = sshConnection.ErrorText(sshConnection.LastError) & vbCrLf
Else

sshConnection.WaitFor ( regex:[$ #>:] $ )
sshConnection.DataReady = 0

'send the command to execute
strLogMsg = sshConnection.Execute( ls -l /home/ + vbLf, $ , 20)
debug.print strLogMsg


sshConnection.Disconnect

End If


Set sshConnection = Nothing

End Sub
[/code]


[00m total 96684
-rw-r--r-- 1 49424042 Aug 16 12:32 [01;31mData-2010-08-16.sql.gz[00m
-rw-r--r-- 1 49468252 Aug 17 12:32 [01;31mData-2010-08-17.sql.gz[00m
[m[user@myserver ]


Complete thread: