I have this code:
using System;
using System.Text;
using Tamir.SharpSsh;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SshExec exec = new SshExec("192.168.0.1", "admin", "haha");
exec.Connect();
string output = exec.RunCommand("interface wireless scan wlan1 duration=5");
Console.WriteLine(output);
exec.Close();
}
}
}
The command will execute! I can see that, but! It immediately prints data. Or actually, it does'nt print the data from the command. It prints like the... logo for the mikrotik os. I actually need the data from the command, and I need SharpSSH to wait at least 5 seconds for data, then give it back to me... Somebody knows how I can do this?
I'm pretty new to this! I appreciate all help! Thank you!