Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1575
  • Last Modified:

Telnet using c#

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
sam000
Asked:
sam000
1 Solution
 
sam000Author Commented:
It is ok, but I need to get back the response and process that in the code using switch
0
 
Kalpesh ChhatralaSoftware ConsultantCommented:
Hope this helpful to you

Asynchronous socket communication example

http://www.codeproject.com/KB/IP/socketsincs.aspx
0
 
Russell_VenableCommented:
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
 
Russell_VenableCommented:
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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now