|
发表于 2009-1-22 21:59:04
|
显示全部楼层
抓狂了 注册机的下面这段代码
#include <date.au3>
#include <string.au3>
Global $mac = StringUpper(StringReplace(_GetMAC(), ":", ""))
Func _GetMAC($getmacindex = 1)
$ipHandle = Run(@ComSpec & ' /c ipconfig /all', '', @SW_HIDE, 2)
$read = ""
Do
$read &= StdoutRead($ipHandle)
Until @error
$read = StringStripWS($read, 7)
$macdashed = StringRegExp($read, '([0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2}-[0-9A-F]{2})', 3)
If Not IsArray($macdashed) Then Return 0
If $getmacindex < 1 Then Return 0
If $getmacindex > UBound($macdashed) Or $getmacindex = -1 Then $getmacindex = UBound($macdashed)
$macnosemicolon = StringReplace($macdashed[$getmacindex - 1], '-', ':', 0)
Return $macnosemicolon
MsgBox(0,"",$macnosemicolon)
EndFunc
MsgBox(0,"",$mac)
在SCITE那儿调试的时候可以用 把他做成EXE就完全读不出MAC地址啊 郁闷啊
|
|