Solved

Telnet using c#

Posted on 2011-02-17
5
1,499 Views
Last Modified: 2012-08-13
I want to build an application in c# which is used to send file via telnet and receive acknowledgement.


Suppose I use cmd and type o 10.200.5.2 and connect to the remote server...
then it ask me to type login name
then it ask me to type password
then it show a screen with a list of options of me.

I want to choose option 1
then I type 1 and press enter

how can I do such things in PHP?
0
Comment
Question by:sam000
5 Comments
 
LVL 12

Expert Comment

by:Mamtha1982
ID: 34914201
0
 

Author Comment

by:sam000
ID: 34914441
It is ok, but I need to get back the response and process that in the code using switch
0
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 34915343
Hope this helpful to you

Asynchronous socket communication example

http://www.codeproject.com/KB/IP/socketsincs.aspx
0
 
LVL 15

Accepted Solution

by:
Russell_Venable earned 500 total points
ID: 34922014
Actually this is exactly what your need. It waits for and reads for specific text in the console and then respondes if it matches. It was made for talking to Cisco Routers, but it easily configurable for this purpose.
CSharp Telnet client
0
 
LVL 15

Expert Comment

by:Russell_Venable
ID: 34922140
If PHP is what you are looking for and not C# first off your in the wrong section ;)

Next you should be looking at something that is already made for that purpose.
PHP Telnet

Make sure you parse the results with for your commands by using the switch example and then $Telnet->DoCommand("Command", $result); to send your command in response. Simple and easy enough.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now