zoukankan      html  css  js  c++  java
  • 取客户端MAC地址的方法

     1public static string GetMac(string clientip)
     2        {
     3            string mac="";
     4            System.Diagnostics.Process process=new System.Diagnostics.Process();
     5            process.StartInfo.FileName="nbtstat";
     6            process.StartInfo.Arguments="-a "+clientip;
     7            process.StartInfo.UseShellExecute=false;
     8            process.StartInfo.CreateNoWindow=true;
     9            process.StartInfo.RedirectStandardOutput=true;
    10            process.Start();
    11            string output=process.StandardOutput.ReadToEnd();
    12            int length=output.IndexOf("MAC Address =");
    13            if(length>0)
    14            {
    15                mac=output.Substring(length+14,17);
    16            }

    17            return mac;
    18        }

    19
    20    }
  • 相关阅读:
    iOS,Layer
    iOS 手势冲突
    ECharts
    手动安装Package Control
    webstorm配置svn详解
    js 对象 类型转换
    google 跨域解决办法
    关于内层DIV设置margin-top不起作用的解决方案
    图片与文字在div里实现垂直水平都居中
    css3之3D翻牌效果
  • 原文地址:https://www.cnblogs.com/DarkAngel/p/382177.html
Copyright © 2011-2022 走看看