Telnet in VB6 code

I want to build a application,
and want to telnet to
Cisco Router and Switch by VB6,
and get some message from
Router and Switch.

Can anybody give me some suggestion or
sample code?
hxbAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
kamallConnect With a Mentor Commented:
I have a ready sample project for telnet. The project contains many forms, controls, and menus. So, it will be difficult for you to make it to work if I post it here.
Comment me your e-mail address so I can send it to you.
Regards.
0
 
hxbAuthor Commented:
huangxb@163.net

Thanks
0
 
kamallCommented:
In your mailbox!
You are welcome.
Regards.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
hxbAuthor Commented:
mail not found yet ,
Please CC to huangxb@usa.net
0
 
kamallCommented:
Forwarded to the new e-mail.
Regards.
0
 
kamallCommented:
BTW, just this moment, I found the following reply from mail server:

   ----- The following addresses had transient non-fatal errors -----
<huangxb@163.net>

   ----- Transcript of session follows -----
<huangxb@163.net>... Deferred: Connection timed out with mx4.163.net.
Warning: message still undelivered after 8 hours
Will keep trying until message is 5 days old
0
 
hxbAuthor Commented:
Adjusted points to 150
0
 
hxbAuthor Commented:
Good code.

Questions
  When I try the sample, and
open to the Router, it will
display:

Username:
Username:^@
Username:VT100^@
Password:
%Access Denied

I think if it is correct,
it will only display
"Username:" and I can input the
username.
I think the VB has send some
Chars or chr(13) to Router.

Please give me some suggestion.
0
 
kamallCommented:
I really can not figure out what goes wrong. The code works very nice for me!
You can easily step througt the code with F8 to see if it sends something after getting the Username string.
Hope that helps.
0
 
hxbAuthor Commented:
Thank
0
 
kamallCommented:
You are welcome hxb.
Did you figured out the problem?
Regards.
0
 
hxbAuthor Commented:

I REM the code
'        Case TERMTYPE
in IAC1() and IAC2()
and the router will display:
Username:      'Line 1
Username:      'Line 2

and then I can login.
I think the VB send some code to
the router after it receive
the "Username:".

How to let it only display one
"Username:"?
If I do not send
the TERMTYPE to the router,
is it OK?



0
 
kamallCommented:
hxb,
why don't give it a try and see?
I think that (usually), you should send the terminal type to the remote host and get the response, but I'm not really sure.
Regards.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.