المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How can I send Ctrl-C using Telnet to a host machine?



C# Programming
10-13-2009, 02:12 PM
I'm writing a small telnet-based app that connects to a *nix box, executes some commands and displays the output. When the user is logged on, several scripts run requiring user input and the set of scripts are different for each box (so I can't just hardcode responses).

It seems like the best solution is to break out of the scripts and do their work myself but I can't figure out how to send the Ctrl-C character to do this. Any ideas?