佳木斯湛栽影视文化发展公司

主頁(yè) > 知識(shí)庫(kù) > 使用ASP獲得服務(wù)器網(wǎng)卡的MAC地址信息

使用ASP獲得服務(wù)器網(wǎng)卡的MAC地址信息

熱門標(biāo)簽:Mysql連接數(shù)設(shè)置 Linux服務(wù)器 阿里云 服務(wù)器配置 科大訊飛語音識(shí)別系統(tǒng) 團(tuán)購(gòu)網(wǎng)站 銀行業(yè)務(wù) 電子圍欄
'----------------------提取所有網(wǎng)卡的信息--------------------' 

Public Function GetMacInfo() 
    On Error Resume Next 

    Dim fso, FileStr, AspSleepThread, CmdStr, SysDir, wshshell, CmdRe, MacFileContentFile, MacFileContent 
    Const MacFile = "TmpYesoulSoft001.LLP" 
    Set fso = Server.CreateObject("Scripting.FileSystemObject") 

    SysDir = Split(GlobalMod.GetSysDir, ",")(1) 
            If InStr(LCase(SysDir), "system32") = 0 Then 
            GetMacInfo = "本系統(tǒng)只能運(yùn)行在Nt、Windows 2000、Windows.Net、Windows Xp、Windows 2003等32位系統(tǒng)下,不支持32位以下的系統(tǒng)!" 
            Exit Function 
            Else 
            CmdStr = SysDir + "\Cmd.exe /C " + SysDir + "\Ipconfig.exe /All > " + Server.MapPath(MacFile) 
            End If 
        CmdRe = Shell(CmdStr, vbHide) 
        If CmdRe > 0 Then 
        Set MacFileContentFile = fso.OpenTextFile(Server.MapPath(MacFile), 1, False, TristateUseDefault) 
        'GetMacInfo = MacFileContentFile.ReadAll() 
        'Response.Flush 
        FileStr = MacFileContentFile.ReadAll() 
        MacFileContentFile.Close 
        Set MacFileContentFile = Nothing 
        Set AspSleepThread = Server.CreateObject("YesoulSoft.SleepThread") 
        '定義線程掛起的時(shí)間,這里為毫秒 
        AspSleepThread.SleepTime = 500 
        AspSleepThread.BeginSleepThread 
        GetMacInfo = ExecuteOne(FileStr, "Physical Address. . . . . . . . . : (.*)") 
        Set AspSleepThread = Nothing 
        Else 
        GetMacInfo = "系統(tǒng)當(dāng)前無法獲取您的網(wǎng)絡(luò)信息,請(qǐng)檢查權(quán)限繼承關(guān)系后再運(yùn)行本系統(tǒng)!" 
        Exit Function 
        End If 
        DelFile MacFile 

    Set fso = Nothing 

End Function 
'------------------在字符串匹配一次結(jié)果-------------------' 
Public Function ExecuteOne(inpStr, PatStr) 
  Dim oRe, oMatch, oMatches 
  Set oRe = New RegExp 
  oRe.Pattern = PatStr 
  inpStr = LCase(inpStr) 
  oRe.IgnoreCase = True 
  Set oMatches = oRe.Execute(inpStr) 
  Set oMatch = oMatches(0) 
  ExecuteOne = oMatch.SubMatches(0) 
End Function

標(biāo)簽:大理 萍鄉(xiāng) 衢州 棗莊 江蘇 蚌埠 衡水 廣元

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《使用ASP獲得服務(wù)器網(wǎng)卡的MAC地址信息》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    嵩明县| 丰城市| 建平县| 望城县| 当阳市| 德钦县| 苏州市| 桐庐县| 龙井市| 龙门县| 崇义县| 玛沁县| 广元市| 南康市| 呈贡县| 鄱阳县| 广水市| 普定县| 新营市| 四会市| 巴林左旗| 普宁市| 彰化市| 铜梁县| 墨玉县| 平罗县| 琼中| 江津市| 耒阳市| 确山县| 广安市| 清丰县| 无棣县| 陆良县| 玉山县| 禹城市| 鄂托克前旗| 柳林县| 邓州市| 宜君县| 南部县|