Results 1 to 13 of 13

Thread: VB Telnet Client using Winsock Control

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367

    Unhappy

    Hello all,

    I am trying to create a telnet client using the winsock control. I know how to use the control, but for some reason when trying to connect to port 23(telnet port) on a unix box, it returns garbage.

    I believe that this is the telnet server requesting to know what terminal type that my client is. Does anyone out here know of a real easy basic telnet client written in vb that they could point me at to get me started in the right direction.

    Cheers
    Bill Rogers

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    I ended up being very frustrated when I was working on this last year.

    At first I though it was a VT100 support problem but now I don't think so as telnet sessions don't start with emulation.

    I read through a few of the RFC's that talk about telnet and found that the garbage comming back matched initial handshake codes of the session. documentation was too scarce to contine and I haven't thought about the project for a while.

    some telnet servers willpass back readable text from the start but many won't. I've seen a few vb projects that succeeded but they had licence timeouts in the ocx's

    Someone need's to sit down with the RFC's and write an OCX...

    I'm happy to work on it with you. Sorry I can't be of more help

    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  3. #3
    New Member
    Join Date
    May 2000
    Location
    Puerto Rico
    Posts
    7

    Smile

    Hi Bill!

    I had the same problem some months ago. I was trying to get some data from a couple of Unix boxes and cut/paste into my reports. I try to make my own client but I had something wrong on the DO/DONT/WILL/WONT thing. Some Unix boxes (HP, Solaris) worked fine and some don’t (SCO, BSD). After many frustrating nights of coding, I found a very good example written in VB. The client was written by “Ian Storrs” and posted on http://storrs.home.ml.org/video/telnet.zip. I check the http page where I get the code, but is no longer working. Anyway I have the source, I could email you the project, it’s a 20k-zip file.

    I guess you can use that example as a start point. Right now, I’m using it with some modifications. I added some functions for scripting (wait for WHO, then send ME!) and make a very simple OCX that calls the main form of the telnet client. Then I use that OCX inside my excel documents, add some VB-scripting that’s it! Reports to go!


    Ruben (The Backup Guy)
    Lonely 3rd Shift Operator

  4. #4
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    Sounds great!

    While you're in the mood to pass them out...

    [email protected]

    Thanks in advance
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    good gracious that code does alot. I wish there was someone who write a book on telnet and what it all does, so when someone looks at some code, he actually can know what is happening.

    What I am attempting to do is make an activeX control, which will use the winsock control, and will allow a developer three options:

    login
    logout
    exchange

    that way any kind of langauge a developer wanted to use such as vb, vc++, asp etc. could use this control to create a telnet session. I just think it is a cool project. But it is also proving to be quite difficult.

  6. #6
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    What are you looking at? can I see it too?

    Telnet from ASP... I want, I want! Think of the web automation you could do.
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  7. #7
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    As long as you are still passing out code, then could someone please hook me up. Thanks. [email protected]

  8. #8
    New Member
    Join Date
    May 2000
    Location
    Puerto Rico
    Posts
    7

    Lightbulb

    Hi

    I’m happy to know that I'm not the only one trying to do telnet stuff from my applications. When I started to look for information on this subject, I browse the net but almost all the time I found the same thing..."That's a difficult project".

    Ian's code is a very good example. What I don't understand very well yet, is how he writes directly to the form. I didn't knew that was possible (I'm new to VB and windows programming). When I fully understand that part, I will try to port the code to an ActiveX Control. Right now, I made a control that calls Ian's frmTelnet form on the mouse_down event. That way I can use that control on excel and word documents. But that is only a walk-around. What I really have in mind is to port completely the code into an ActiveX control.

    I know there are some controls like this on the net, but they are not free. I'm also thinking on making it as user friendly as possible. So easy that anyone could use it to automate telnet operations (like login, issue commands, copy results, paste data on a report, etc).

    Maybe we could set up a team, share ideas and develop this project together... let me know.

    Ruben (The Backup Guy)
    Lonely 3rd Shift Operator

  9. #9
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    Sounds like a good idea,

    But how is Ian and where is his code?
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  10. #10
    New Member
    Join Date
    May 2000
    Location
    Puerto Rico
    Posts
    7

    Post I found a copy of the code on the net...


    Paul

    I found a copy of the original code on the net:

    http://www.netfokus.dk/vbadmincode/code/telnet.zip

    About Ian... I tried to email this guy just to say "thanks!", but the email address on the code's comments is not working ...

    Ruben (The Backup Guy)
    Lonely 3rd Shift Operator
    Using VB-5.0


  11. #11
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    Thanks dood,

    Still have to debug it, it's got errors. then after the errors are fixed, it doesn't work.

    Ugly, API used to scroll the screen, the guy should have used an RTF box.
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  12. #12
    New Member
    Join Date
    May 2000
    Location
    Puerto Rico
    Posts
    7
    Thats right Paul... if an RTF box is used instead of the API calls (which I still don't understand), the code could be easier to read/port.

    Ruben (The Backup Guy)
    Lonely 3rd Shift Operator
    Using VB-5.0

  13. #13
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    ever get this working

    Mine jsut sits there and says " telnet negotaitions starting ""


    anyone got a copy that you made changes to that works ??

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