Results 1 to 6 of 6

Thread: terminal maybe?

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2001
    Posts
    36

    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:
    1. Private Sub Command1_Click()
    2. With Winsock1
    3.        .RemotePort = port.Text
    4.        .RemoteHost = address.Text
    5.        .Connect
    6.    End With
    7.    status.Caption = "Connecting...."
    8. End Sub
    9.  
    10. Private Sub disconnect_Click()
    11.     Winsock1.Close
    12.     status.Caption = "Not Connected"
    13. End Sub
    14.  
    15. Private Sub sendstr_Click()
    16.     Winsock1.SendData inputstr.Text & vbLf
    17.     List1.AddItem inputstr.Text
    18.     inputstr.Text = ""
    19. End Sub
    20.  
    21. Private Sub Winsock1_Connect()
    22.     Winsock1.SendData send1.Text & vbLf
    23.     Winsock1.SendData send2.Text & vbLf
    24.     status.Caption = "Connected!"
    25. 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

  2. #2
    Addicted Member Dim A's Avatar
    Join Date
    Jul 2000
    Posts
    201
    Is it a vb unicode problem?

    Try something like:
    VB Code:
    1. buffer=StrConv(Buffer, vbUnicode)

    That might turn it into something more readible...

    - Dim A

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2001
    Posts
    36
    where abouts do i put that?
    james

  4. #4
    Addicted Member Dim A's Avatar
    Join Date
    Jul 2000
    Posts
    201
    Are you using something like this?
    VB Code:
    1. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    2. Dim temp As String
    3.  
    4. Winsock1.GetData temp
    5. PictureBox.Print temp
    6.  
    7. End Sub

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2001
    Posts
    36
    VB Code:
    1. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    2.  
    3.     Dim strData As String
    4.     Dim ReturnData As String
    5.     Dim Strdata2 As String
    6.     Dim ReturnData2 As String
    7.     Winsock1.GetData strData, vbString
    8.     List1.AddItem strData
    9. 'other stuff'
    10.  
    11. End Sub

    So yes I am
    james

  6. #6
    Addicted Member Dim A's Avatar
    Join Date
    Jul 2000
    Posts
    201
    Odd...

    Works fine for me to pull up webpages...

    you could try:
    VB Code:
    1. 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
  •  



Click Here to Expand Forum to Full Width