|
-
Sep 14th, 2001, 12:06 PM
#1
Thread Starter
Member
terminal maybe?
I have been allowed access to a friends wingate, which he uses for his mail server. I said cool thanks, and I yesterday tried to use it.
I got the login prompt, and I typed in my username and pass via telnet, and started using it.
Now I wanted to make a prog in vb to do it, easy I thought. Heres a snippet of the code
VB Code:
Private Sub Command1_Click()
With Winsock1
.RemotePort = port.Text
.RemoteHost = address.Text
.Connect
End With
status.Caption = "Connecting...."
End Sub
Private Sub disconnect_Click()
Winsock1.Close
status.Caption = "Not Connected"
End Sub
Private Sub sendstr_Click()
Winsock1.SendData inputstr.Text & vbLf
List1.AddItem inputstr.Text
inputstr.Text = ""
End Sub
Private Sub Winsock1_Connect()
Winsock1.SendData send1.Text & vbLf
Winsock1.SendData send2.Text & vbLf
status.Caption = "Connected!"
End Sub
Now then, I connected all right, but my login prmpt, instead of coming out as:
<address>
login :
It came out more like
yy|yy#yy
but the y's all had funny accents on them. I don't know why this is.
Theres a terminal option in telnet, that something to do with it?
Thanks
james

-
Sep 14th, 2001, 01:45 PM
#2
Addicted Member
Is it a vb unicode problem?
Try something like:
VB Code:
buffer=StrConv(Buffer, vbUnicode)
That might turn it into something more readible...
- Dim A
-
Sep 14th, 2001, 02:02 PM
#3
Thread Starter
Member
where abouts do i put that?
james

-
Sep 14th, 2001, 02:58 PM
#4
Addicted Member
Are you using something like this?
VB Code:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim temp As String
Winsock1.GetData temp
PictureBox.Print temp
End Sub
-
Sep 14th, 2001, 04:05 PM
#5
Thread Starter
Member
VB Code:
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
Dim ReturnData As String
Dim Strdata2 As String
Dim ReturnData2 As String
Winsock1.GetData strData, vbString
List1.AddItem strData
'other stuff'
End Sub
So yes I am
james

-
Sep 14th, 2001, 04:19 PM
#6
Addicted Member
Odd...
Works fine for me to pull up webpages...
you could try:
VB Code:
strData=StrConv(strData, vbUnicode)
Right before you do your list add item in Sub Winsock1_DataArrival
- Dim A
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|