国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

使用ASP獲得服務器網卡的MAC地址信息

2024-05-04 11:02:09
字體:
來源:轉載
供稿:網友
'----------------------提取所有網卡的信息--------------------' 

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 = "本系統只能運行在Nt、Windows 2000、Windows.Net、Windows Xp、Windows 2003等32位系統下,不支持32位以下的系統!" 
            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") 
        '定義線程掛起的時間,這里為毫秒 
        AspSleepThread.SleepTime = 500 
        AspSleepThread.BeginSleepThread 
        GetMacInfo = ExecuteOne(FileStr, "Physical Address. . . . . . . . . : (.*)") 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 永年县| 宁波市| 雅江县| 临西县| 泉州市| 四川省| 阿合奇县| 乌鲁木齐市| 东至县| 花莲县| 黔东| 曲阳县| 太湖县| 温州市| 临潭县| 福贡县| 哈密市| 东安县| 揭西县| 克什克腾旗| 沙雅县| 邓州市| 涡阳县| 富平县| 临沂市| 夏河县| 青河县| 静宁县| 凉城县| 龙岩市| 济阳县| 腾冲县| 民丰县| 广丰县| 怀远县| 冀州市| 通化市| 合肥市| 宜都市| 壶关县| 长兴县|