如何获取使用ARP的活动LAN用户列表 [英] how can I get list of active LAN user using ARP
本文介绍了如何获取使用ARP的活动LAN用户列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在命令提示符下,我们可以使用以下命令获取活动用户IP列表(在LAN上)
in command prompt we can get list of ACTIVE user's IP [on LAN] using command like
arp - g
如何使用C#获取类似的列表
How can I get similar list using C#
推荐答案
您可以使用Process
从c# program
尝试一下:
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "arp";
startInfo.Arguments = "-g";
startInfo.RedirectStandardOutput = true;
startInfo.UseShellExecute = false;
process.StartInfo = startInfo;
process.Start();
String strData = process.StandardOutput.ReadToEnd();
这篇关于如何获取使用ARP的活动LAN用户列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文