This is a basic Telnet client using the Winsock control. Notice that it sends each character as soon as it is typed--this is how telnet servers accept stuff from the terminal.
Main Topics
Browse All Topicshi =) i'm just new in programming with winsock, so far, what i'm trying to do now is establish a connection to a remote unix server using the winsock telnet protocol(port 23). I'm hoping to use this connection to Send local files, Access, and Retrieve remote files from Unix(i'd appreciate help on this too.) but everytime i'm able to connect to the unix server, it returns : ÿýÿýÿý#ÿý'ÿý$
i don't know what this means. i'm not sure if this is raw data from unix that windows cannot decode to human readable format or if it is the actual data that i should respond to. i don't know how to communicate with the unix server from here, much more, i don't think i was able to login the unix server itself coz i couldn't even see the 'LOGIN:' prompt.
i need to know urgently, any help would be greatly appreciated! Thank You in Advance!!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks for the prompt reply RavenofThought!
unfortunately, it still returns the same message( ÿýÿýÿý#ÿý'ÿý$) after connection has been made. actually i've tried coding something similar before but like the this one, it didn't work for me....i'm sorry bout that... i'm still hoping to be able to read/understand what UNIX is returning to me.
another thing is, the txtincoming only reflected the text i typed in txtoutgoing, which are usually UNIX commands, i was hoping to get results to those commands(e.g. pwd, ls, etc.) hope you can still help me out on this...
thank you very much!
PLavelle - fyi - here is what i found:
1. this tool can do alot of the work for you...http://www.symantec.
example: run a script against the target machine and save output to text file
2. this is my tool of choice because it allows for greater control...but you have to program it - http://www.dart.com/powert
example: start an emulation session and grab the output into variables for parsing, saving etc.
hope it helps.
Business Accounts
Answer for Membership
by: RavenOfThoughtPosted on 2003-06-03 at 20:15:25ID: 8644728
VERSION 5.00 0080C7E7B7 8D}#1.0#0" ; "MSWINSCK.OCX"
cii As Integer)
bytesTotal As Long)
Object = "{248DD890-BB45-11CF-9ABC-
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5535
ClientLeft = 60
ClientTop = 345
ClientWidth = 8655
LinkTopic = "Form1"
ScaleHeight = 5535
ScaleWidth = 8655
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdClear
Caption = "Clear"
Height = 495
Left = 2640
TabIndex = 3
Top = 4920
Width = 2175
End
Begin MSWinsockLib.Winsock Winsock1
Left = 0
Top = 0
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin VB.CommandButton cmdConnect
Caption = "Connect"
Height = 495
Left = 120
TabIndex = 2
Top = 4920
Width = 2175
End
Begin VB.TextBox txtOutgoing
Height = 285
Left = 120
TabIndex = 1
Top = 4440
Width = 8415
End
Begin VB.TextBox txtIncoming
Height = 4215
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 120
Width = 8415
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdClear_Click()
txtIncoming.Text = ""
End Sub
Private Sub cmdConnect_Click()
Winsock1.Close
Winsock1.Connect "Hostname", 23
End Sub
Private Sub txtIncoming_Change()
txtIncoming.SelStart = Len(txtIncoming.Text)
End Sub
Private Sub txtOutgoing_KeyPress(KeyAs
If Winsock1.State = 7 Then
Winsock1.SendData Chr(KeyAscii)
If KeyAscii = vbKeyReturn Then
txtIncoming.Text = txtIncoming.Text & txtOutgoing.Text & vbNewLine
txtOutgoing.Text = ""
End If
Else
MsgBox "Not Connected to Server!"
txtOutgoing.Text = ""
End If
End Sub
Private Sub Winsock1_Close()
Winsock1.Close
txtIncoming.Text = txtIncoming.Text & "***Connection Closed***" & vbNewLine
End Sub
Private Sub Winsock1_Connect()
txtIncoming.Text = txtIncoming.Text & "***Connected to " & Winsock1.RemoteHost & "***" & vbNewLine
End Sub
Private Sub Winsock1_DataArrival(ByVal
Dim strData As String
Winsock1.GetData strData
strData = Replace(strData, vbLf, "")
strData = Replace(strData, vbCr, vbNewLine)
txtIncoming.Text = txtIncoming.Text & strData & vbNewLine
End Sub