public partial class _111111111 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string dirResults = "";
        ProcessStartInfo psi = new ProcessStartInfo();
        Process proc = new Process();
        psi.FileName = "nbtstat";
        psi.RedirectStandardInput = false;
        psi.RedirectStandardOutput = true;
        psi.Arguments = "-A " + Request.ServerVariables["REMOTE_ADDR"];
        psi.UseShellExecute = false;
        proc = Process.Start(psi);
        dirResults = proc.StandardOutput.ReadToEnd();
        proc.WaitForExit();
        dirResults = dirResults.Replace("\r", "").Replace("\n", "").Replace("\t", "");        Regex reg = new Regex("Mac[ ]{0,}Address[ ]{0,}=[ ]{0,}(?((.)*?)) __MAC", RegexOptions.IgnoreCase | RegexOptions.Compiled);
        Match mc = reg.Match(dirResults + "__MAC");        if (mc.Success)
        {
            this.Label1.Text = mc.Groups["key"].Value;
        return;
        }
        else
        {
            reg = new Regex("Host not found", RegexOptions.IgnoreCase | RegexOptions.Compiled);
            mc = reg.Match(dirResults);
            if (mc.Success)
            {
                this.Label1.Text = "Host not found!";
                return ;
            }
            else
            {
                this.Label1.Text = "";
                return ;
            }
        }      }
}