Solved

Telnet using c#

Posted on 2011-02-17
5
1,502 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

785 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