用asp.net获取客户端网卡的mac地址_用ASP.Net获取客户端网卡的MAC

更新时间:2014-02-20    来源:客户端相关打印    手机版     字体:

【www.bbyears.com--客户端相关打印】

 
using System.Text.RegularExpressions;
using System.Diagnostics;
public class test
{
     public test
     {}
     public static string GetCustomerMac(string IP) //para IP is the client's IP 
        { 
            string dirResults=""; 
            ProcessStartInfo psi  = new ProcessStartInfo(); 
            Process proc = new Process(); 
            psi.FileName = "nbtstat"; 
            psi.RedirectStandardInput = false; 
            psi.RedirectStandardOutput = true; 
            psi.Arguments = "-A " + IP; 
            psi.UseShellExecute = false; 
            proc = Process.Start(psi); 
            dirResults = proc.StandardOutput.ReadToEnd(); 
            proc.WaitForExit(); 

本文来源:http://www.bbyears.com/aspjiaocheng/4319.html

猜你感兴趣

热门标签

更多>>

本类排行