I am trying to get the list of all the Computers connected on My network and I was able to do so.
But then I need to get the Hostanme of the Ip address which i have stored in the String format with some other data like mac address.
I have tried using json But was not able to get the List of Ip from the String. I just List of ip from the String so that using Foreach I can find the hostname on that specific in.
Here is the code:
static void Main(String[] args)
{
Process arp = new Process();
arp.StartInfo.UseShellExecute = false;
arp.StartInfo.RedirectStandardOutput = true;
arp.StartInfo.FileName = "C://Windows//System32//cmd.exe";
arp.StartInfo.Arguments = "/c arp -a";
arp.StartInfo.RedirectStandardOutput = true;
arp.Start();
arp.WaitForExit();
string output = arp.StandardOutput.ReadToEnd();
Console.WriteLine(output);
Console.WriteLine(data.Internet_Address);
Console.ReadLine();
}
}
And here is the Output :