Advertisement

08.30.2005 at 10:34PM PDT, ID: 21545853
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Redirecting CMD.EXE input/output problems with Telnet and FTP

Asked by oxygen_728 in Windows Programming

Tags: ,

Note: I'm posting this question in this category in hopes that I will get an answer. It is also posted in VB.net... but the question doesn't quite fit a category in my mind. I will close whichever question gets no answers.

Basically I'm working on a program in VB.net which will:

1. Connect to telnet server
2. Continue sending input throughout the telnet session... input which depends on:
3. Retrieving output from the session.

Thus far, I have this:

        p = New Process

        p.StartInfo.RedirectStandardOutput = True
        p.StartInfo.RedirectStandardInput = True
        p.StartInfo.CreateNoWindow = True
        p.StartInfo.UseShellExecute = False
        p.StartInfo.FileName = "cmd.exe"
        p.Start()

        out = p.StandardOutput 'out is a streamreader
        inn = p.StandardInput  'inn is a streamwriter
        inn.AutoFlush = True

        inn.Write("telnet" & vbCrLf)

        RichTextBox1.Text = out.ReadLine() & vbCrLf
        RichTextBox1.Text &= out.ReadLine() & vbCrLf
        RichTextBox1.Text &= out.ReadLine() & vbCrLf
        RichTextBox1.Text &= out.ReadLine() & vbCrLf
        RichTextBox1.Text &= out.ReadLine() & vbCrLf


My output is:

-------------Start-----------------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Prog\Telnet Prog\bin>telnet

-------------End---------------------


But, RichTextBox1 should show the telnet info I would think...

However, I do realize that the telnet command starts up a telnet.exe process which may "overlay" the command prompt.

That doesn't change the fact that I can start up cmd.exe in shellmode and use the system.windows.forms.sendkeys command to send input to telent through cmd.exe.
If i do it this way, however, all I can do is provide input - I cannot analyze output.


So... the big question.

How can interactively provide input and output to telnet?
Start Free Trial
 
Loading Advertisement...
 
[+][-]08.30.2005 at 11:07PM PDT, ID: 14791241

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Windows Programming
Tags: telnet, output
Sign Up Now!
Solution Provided By: AlexFM
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.30.2005 at 11:39PM PDT, ID: 14791332

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.30.2005 at 11:40PM PDT, ID: 14791333

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.30.2005 at 11:59PM PDT, ID: 14791384

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2005 at 12:02AM PDT, ID: 14791400

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2005 at 12:06AM PDT, ID: 14791415

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.02.2005 at 11:07PM PDT, ID: 14815092

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43