Results 1 to 17 of 17

Thread: Winsock test

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    I have posted this three times and noone could do it... Give it a try..


    1. using windows telnet program telnet into

    http://www.kurtsimons.com on port 23

    you get back a logon prompt

    now in VB using the winsock control (or any other way!!!)

    connect to http://www.kurtsimons.com on port 23 and see what you get back. Gibberish!


    HEEEEELLLLP!

    Telnet Protocol RFC???
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    That website asks us to chose a wedding. ::

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    No not port 80!!!
    don't use a browser

    telnet into port 23 a unix shell prompt!

    [Edited by kurtsimons on 07-31-2000 at 11:48 AM]
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    No ones knows UGH!

    what if your boss asked you to automate a telnet session where you have to log onto a linux box????

    Would you answer him or just give a big white stare!!


    Thanks Anyway
    Kurt
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  5. #5
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    a couple choices you have;

    what you need is a telnet control or dll, which will handle all the telnet negotation and handshaking which is a part of telnet (all the RFC's talk about this).

    Your choices for this are

    1) buy a third party control, to buy a telnet one is not cheap.

    2) develop your own, which is not that easy to do, took me around 2 weeks, and it is a basic one, with no terminal emulation.


    If you have a control it is easy to do, the good thing of it being an activeX control or activeX dll is that any activeX client may use it. Such as an asp, vb program, vc++, pick your medicine.

    My telnet control offers

    1) logon ( String host; String userid; String password)
    2) logoff()
    3) telnetSend(string cmd; integer secondsToWait; String Reply(); Integer lineCount)
    4) Show()
    5) UnShow()

    Show and UnShow show a form which actually shows a display of the remote and telnet host communction, so it shows the prompts, commands, and replies. This is a debug must, since developers that use it may need to see what is happening.


    Good luck on this, as you see with the correct control or dll, your job is very easy.

    Cheers

    Bill

    [Edited by billrogers on 07-31-2000 at 01:22 PM]

  6. #6
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    oh forgot those methods return status codes back as a integer type, to tell the status of the method. So they can see if they logged in, if there command they sent went through properly.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    Why is telnet so complicated?

    Is there anything or can show me to get me started. I only need to automate a single process of retreiving current WSI temperatures for 10 locations in New England from a Unix Box.
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  8. #8
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    HOw about getting the unix box to send out that info someplace and have vb pick it up.
    For example...a webpage.

    Gl,
    D!m
    Dim

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    It once DID...

    it FTP'ed the info every 30 minutes.

    But we changed a few things and the guy at the company is no where to be found and noone else knows how.

    It a Weather Computer at a Television Station running Weather Producer software on top of 4 silicon graphics unix boxes. I don't know unix so I don't want to start poking around
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  10. #10
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    look into cron job, it is a unix utility, it allows you to schedule stuff to run at certain times, say for instance every half an hour...

    so ya could write a quick c program that will login into your ftp server and ftp the data. or ya might even be able to put shell commands directly in cron job for the stuff to get kicked off.

  11. #11
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    to answer one of the previous questions you asked
    why does telnet have to be so complicated
    Telnet is a protocol as I am sure you know, other protocols include http, tcp/ip, ftp, etc. The telnet protocol has to deal with all the options for things as terminal emulation, echo, etc. numerous options.

    I would not sugget you go this route for what you wish to achieve, there are numerous other ways to get this done. You could use the Inet control and ftp into the unix box and transfer the files you need over. Or you could have the unix box put the in a http directory, and you could grap the files with the inet control using the http protocol.

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    I do not believe the file "exists" it is generated by the shell program.

    Maybe I can schedule the box
    I'll have to call them

    But I would like to get something working in the short term.

    This is a very "unprofessional program" so it doesn't make much of a difference
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  13. #13
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    how do you get the information? telnet in, and then call the shell program, which then spits out?

  14. #14

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    The way I was going to do it

    Shell telnet

    send keys to start logging to a file

    vb monitors that file and send next keystrokes until the desired data has been received

    The closes telnet and continues


    - I know, I know, but right now they depend on the internet for the temps and I need to give them an alternative no matter how crewl it is.

    I would appreciate any help very much.

    where could I get info on the telnet RFCs?
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    I GOT MY ANSWER

    someone on another site emailed me a telnet client that they wrote...

    the whole thing!
    (and its long)

    YESSSSSSSSSSS!

    Thanks to all
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  16. #16
    Lively Member
    Join Date
    Jul 2000
    Posts
    72
    could i get a copy of the telent client
    PLEASE
    VB 6 Professional Edition

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    Send me your email

    [email protected]
    Kurt Simons
    [I know I'm a hack but my clients don't!]

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