How to execute commands one by one (wodSSH / wodSSH.NET)
How my code should look like if i want to send commands one by one after connected.
I have following code to connect.
public void DoWork()
{
WODTELNETDLXCOMLIB.wodTelnetDLXCom telnet1 = new WODTELNETDLXCOMLIB.wodTelnetDLXCom();
telnet1.Timeout = 30;
telnet1.Connected += new WODTELNETDLXCOMLIB._IwodTelnetDLXComEvents_ConnectedEventHandler(telnet1_Connected);
telnet1.PromptReceived += new WODTELNETDLXCOMLIB._IwodTelnetDLXComEvents_PromptReceivedEventHandler(telnet1_PromptReceived);
telnet1.Disconnected += new WODTELNETDLXCOMLIB._IwodTelnetDLXComEvents_DisconnectedEventHandler(telnet1_Disconnected);
telnet1.Blocking = true;
telnet1.Login = user ;
telnet1.Password = password ;
telnet1.Connect(IPADDRESS, 23, WODTELNETDLXCOMLIB.ProtocolsEnum.Telnet);
if (this.isConnected)
{
// here i want to execute commands one by one. how do i do that.
// when i login i get screen which shows Press any key to continue and i have to hit enter key to goto next screen
// on next screen i get some other text plus prompt Code: where i have to enter command 'DTL' and then enter.
// on next screen i get : where i have to execute command 'sys' to go to unix prompt
// so on...
can somebody show me sequence of code in C# to achieve this.
}
}
Complete thread:
- How to execute commands one by one - lax4u, 2007-07-03, 00:31
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 01:38
- Re: How to execute commands one by one - lax4u, 2007-07-03, 06:54
- Re: How to execute commands one by one - woddrazen, 2007-07-03, 08:13
- Re: How to execute commands one by one - lax4u, 2007-07-03, 15:27
- Re: How to execute commands one by one - woddrazen, 2007-07-03, 15:53
- Re: How to execute commands one by one - lax4u, 2007-07-03, 15:59
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 16:03
- Re: How to execute commands one by one - lax4u, 2007-07-03, 16:19
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 16:26
- Re: How to execute commands one by one - lax4u, 2007-07-03, 17:10
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 17:41
- Re: How to execute commands one by one - lax4u, 2007-07-03, 17:41
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 17:57
- Re: How to execute commands one by one - lax4u, 2007-07-03, 18:15
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 18:26
- Re: How to execute commands one by one - lax4u, 2007-07-03, 20:56
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 21:10
- Re: How to execute commands one by one - lax4u, 2007-07-03, 20:56
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 18:26
- Re: How to execute commands one by one - lax4u, 2007-07-03, 18:15
- Re: How to execute commands one by one - wodDamir, 2007-07-03, 17:57
- Re: How to execute commands one by one - lax4u, 2007-07-03, 17:41
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 17:41
- Re: How to execute commands one by one - lax4u, 2007-07-03, 17:10
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 16:26
- Re: How to execute commands one by one - lax4u, 2007-07-03, 16:19
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 16:03
- Re: How to execute commands one by one - lax4u, 2007-07-03, 15:59
- Re: How to execute commands one by one - woddrazen, 2007-07-03, 15:53
- Re: How to execute commands one by one - lax4u, 2007-07-03, 15:27
- Re: How to execute commands one by one - woddrazen, 2007-07-03, 08:13
- Re: How to execute commands one by one - lax4u, 2007-07-03, 06:54
- Re: How to execute commands one by one - wodSupport, 2007-07-03, 01:38