找回密码
 加入
搜索
查看: 4526|回复: 14

水区发帖,大家谈谈计算机的"特征码"

 火.. [复制链接]
发表于 2012-1-19 14:46:40 | 显示全部楼层 |阅读模式
假设有10台硬件配置都相同的的机器, IP地址,网卡的mac地址,和机器名都不固定,那么有什么其他的方式来标识这个计算机.
发表于 2012-1-19 14:49:49 | 显示全部楼层
贴标签最保险了。
发表于 2012-1-19 17:11:00 | 显示全部楼层
每台机装个不同的系统 freedos msdos win1.x 2.x 3.x 95 98 nt 2k 2k3 xp 7 08 足够了
发表于 2012-1-19 22:15:34 | 显示全部楼层
本帖最后由 zch11230 于 2012-1-19 22:17 编辑

不开机看 就贴个标签  要开机就把桌面壁纸上加个添加个备注。
如果是说的软件运行需要注册之类的特征码  有个GUID 编码  具有唯一性  重装系统 重新分区这个码都不会变 但是没有两台电脑会是重复的
发表于 2012-2-18 02:09:07 | 显示全部楼层
2007060807
发表于 2012-2-24 22:24:50 | 显示全部楼层
怎么说呢..
发表于 2012-3-2 22:45:14 | 显示全部楼层
发表于 2012-3-12 11:33:07 | 显示全部楼层
计算机名啊
发表于 2012-3-12 11:36:43 | 显示全部楼层
还是贴标比较好点
发表于 2012-3-13 17:52:01 | 显示全部楼层
还是贴标比较好点
发表于 2012-3-14 21:16:11 | 显示全部楼层
发表于 2012-3-20 21:25:10 | 显示全部楼层

for $i = 0 to  100
msgbox(0,"","拆了")
msgbox(0,"","装起")
next
msgbox(0,"温馨提示","请用您的鼻子闻闻看这是谁")
发表于 2020-8-9 13:12:17 | 显示全部楼层
zch11230 发表于 2012-1-19 22:15
不开机看 就贴个标签  要开机就把桌面壁纸上加个添加个备注。
如果是说的软件运行需要注册之类的特征码   ...

GUID 编码  有相关学习资料吗?
发表于 2020-8-9 19:44:50 | 显示全部楼层
#include <array.au3>
#include <winapi.au3>

$a = _Drive_GetHardwareInfos("C")
_ArrayDisplay($a)

Func _Drive_GetHardwareInfos($DriveLetter)

    Local $a_Info_Drive_Hardware_temp[4], $ret, $tTemp, $ptrTemp

    $ret = DllCall("kernel32.dll", 'ptr', 'CreateFileW', _
            'wStr', '\\.\' & $DriveLetter & ':', _
            'dword', 0, _
            'dword', 7, _
            'ptr', 0, _
            'dword', 3, _
            'dword', 0, _
            'ptr', 0 _
            )

    If @error Then Return SetError(1, 0, $a_Info_Drive_Hardware_temp)
    If $ret[0] = 0xFFFFFFFF Then Return SetError(2, 0, $a_Info_Drive_Hardware_temp)

    Local $hDevice = $ret[0]

    Local Const $tagSTORAGE_PROPERTY_QUERY = 'ULONG_PTR PropertyId;ULONG_PTR QueryType;byte AdditionalParameters[4]'
    Local Const $tagSTORAGE_DESCRIPTOR_HEADER = 'dword Version;dword Size'

    Local $tSTORAGE_PROPERTY_QUERY = DllStructCreate($tagSTORAGE_PROPERTY_QUERY)
    DllStructSetData($tSTORAGE_PROPERTY_QUERY, 'PropertyId', 0)
    DllStructSetData($tSTORAGE_PROPERTY_QUERY, 'QueryType', 0)

    Local $tSTORAGE_DESCRIPTOR_HEADER = DllStructCreate($tagSTORAGE_DESCRIPTOR_HEADER)

    $ret = DllCall("kernel32.dll", 'int', 'DeviceIoControl', _
            'handle', $hDevice, _
            'dword', 0x002D1400, _
            'ptr', DllStructGetPtr($tSTORAGE_PROPERTY_QUERY), _
            'dword', DllStructGetSize($tSTORAGE_PROPERTY_QUERY), _
            'PTR', DllStructGetPtr($tSTORAGE_DESCRIPTOR_HEADER), _
            'dword', DllStructGetSize($tSTORAGE_DESCRIPTOR_HEADER), _
            'dword*', 0, _
            'ptr', 0 _
            )

    If DllStructGetData($tSTORAGE_DESCRIPTOR_HEADER, "Size") Then

        Local Const $tagSTORAGE_DEVICE_DESCRIPTOR = 'ulong Version;ulong Size;byte DeviceType;byte DeviceTypeModifier;byte RemovableMedia;byte CommandQueueing;ulong VendorIdOffset;ulong ProductIdOffset;ulong ProductRevisionOffset;ulong SerialNumberOffset;ulong BusType;ulong RawPropertiesLength;byte RawDeviceProperties[' & DllStructGetData($tSTORAGE_DESCRIPTOR_HEADER, "Size") & ']'
        Local $tSTORAGE_DEVICE_DESCRIPTOR = DllStructCreate($tagSTORAGE_DEVICE_DESCRIPTOR)

        $ret = DllCall("kernel32.dll", 'int', 'DeviceIoControl', _
                'handle', $hDevice, _
                'dword', 0x002D1400, _
                'PTR', DllStructGetPtr($tSTORAGE_PROPERTY_QUERY), _
                'dword', DllStructGetSize($tSTORAGE_PROPERTY_QUERY), _
                'PTR', DllStructGetPtr($tSTORAGE_DEVICE_DESCRIPTOR), _
                'dword', DllStructGetSize($tSTORAGE_DEVICE_DESCRIPTOR), _
                'dword*', 0, _
                'PTR', 0 _
                )

                ;厂商
        If DllStructGetData($tSTORAGE_DEVICE_DESCRIPTOR, "VendorIdOffset") Then

            $ptrTemp = DllStructGetPtr($tSTORAGE_DEVICE_DESCRIPTOR) + DllStructGetData($tSTORAGE_DEVICE_DESCRIPTOR, "VendorIdOffset")

            $tTemp = DllStructCreate("char Temp[" & _WinAPI_StringLenA($ptrTemp) & "]", $ptrTemp)
            $a_Info_Drive_Hardware_temp[0] = DllStructGetData($tTemp, "Temp")

        EndIf

                ;名称
        If DllStructGetData($tSTORAGE_DEVICE_DESCRIPTOR, "ProductIdOffset") Then

            $ptrTemp = DllStructGetPtr($tSTORAGE_DEVICE_DESCRIPTOR) + DllStructGetData($tSTORAGE_DEVICE_DESCRIPTOR, "ProductIdOffset")

            $tTemp = DllStructCreate("char Temp[" & _WinAPI_StringLenA($ptrTemp) & "]", $ptrTemp)
            $a_Info_Drive_Hardware_temp[1] = DllStructGetData($tTemp, "Temp")
        EndIf

                ;固件
        If DllStructGetData($tSTORAGE_DEVICE_DESCRIPTOR, "ProductRevisionOffset") Then

            $ptrTemp = DllStructGetPtr($tSTORAGE_DEVICE_DESCRIPTOR) + DllStructGetData($tSTORAGE_DEVICE_DESCRIPTOR, "ProductRevisionOffset")

            $tTemp = DllStructCreate("char Temp[" & _WinAPI_StringLenA($ptrTemp) & "]", $ptrTemp)
            $a_Info_Drive_Hardware_temp[2] = DllStructGetData($tTemp, "Temp")

        EndIf

                ;序列号
        If "0x" & Hex(DllStructGetData($tSTORAGE_DEVICE_DESCRIPTOR, "SerialNumberOffset")) <> "0xFFFFFFFF" Then

            $ptrTemp = DllStructGetPtr($tSTORAGE_DEVICE_DESCRIPTOR) + DllStructGetData($tSTORAGE_DEVICE_DESCRIPTOR, "SerialNumberOffset")

            $tTemp = DllStructCreate("char Temp[" & _WinAPI_StringLenA($ptrTemp) & "]", $ptrTemp)
            $a_Info_Drive_Hardware_temp[3] = DllStructGetData($tTemp, "Temp")

        EndIf

    EndIf

;~     $a_Info_Drive_Hardware_temp[0] = _StringToReadable($a_Info_Drive_Hardware_temp[0])
;~     $a_Info_Drive_Hardware_temp[1] = _StringToReadable($a_Info_Drive_Hardware_temp[1])
;~     $a_Info_Drive_Hardware_temp[2] = _StringToReadable($a_Info_Drive_Hardware_temp[2])
;~     $a_Info_Drive_Hardware_temp[3] = _SwapStringOrder(_StringToReadable($a_Info_Drive_Hardware_temp[3]))

    DllCall("kernel32.dll", 'int', 'CloseHandle', 'hwnd', $hDevice)
    Return $a_Info_Drive_Hardware_temp
EndFunc   ;==>_Drive_GetHardwareInfos

Func _StringToReadable($sString)
    Local $sString_Return, $iAscCode
    Local $aString = StringSplit($sString, "")
    For $i = 1 To $aString[0]
        $iAscCode = Asc($aString[$i])
        Switch $iAscCode
            ; Case 32 to 126
            Case 48 To 57, 65 To 90, 97 To 122
                $sString_Return &= $aString[$i]
        EndSwitch
    Next
    Return $sString_Return
EndFunc   ;==>_StringToReadable

Func _SwapStringOrder($sString)
    Local $sString_Return, $iAscCode
    ; ConsoleWrite($sString & @TAB & StringLen($sString) & @CRLF)
    Local $aString = StringSplit($sString, "")
    For $i = 1 To $aString[0] Step 2
        If $i + 1 > $aString[0] Then
            $sString_Return &= $aString[$i]
            ExitLoop
        EndIf
        $sString_Return &= $aString[$i + 1] & $aString[$i]
        ; ConsoleWrite($i & @TAB & $aString[0] & @CRLF)
    Next
    Return $sString_Return
EndFunc   ;==>_SwapStringOrder

发表于 2020-8-9 19:47:01 | 显示全部楼层
__wmi_Win32_BIOS()
Func __wmi_Win32_BIOS()
        Local $wbemFlagReturnImmediately = 0x10
        Local $wbemFlagForwardOnly = 0x20
        Local $colItems = ""
        Local $strComputer = "localhost"

        Local $Output=""
        $Output &= "Computer: " & $strComputer  & @CRLF
        $Output &= "==========================================" & @CRLF
        Local $objWMIService = ObjGet("winmgmts:\" & $strComputer & "\root\CIMV2")
        $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", _
                                          $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

        If IsObj($colItems) then
           For $objItem In $colItems
                     Local $strBiosCharacteristics = $objItem.BiosCharacteristics(0)
              $Output &= "BiosCharacteristics: " & $strBiosCharacteristics & @CRLF
                     Local $strBIOSVersion = $objItem.BIOSVersion(0)
              $Output &= "BIOSVersion: " & $strBIOSVersion & @CRLF
              $Output &= "BuildNumber: " & $objItem.BuildNumber & @CRLF
              $Output &= "Caption: " & $objItem.Caption & @CRLF
              $Output &= "CodeSet: " & $objItem.CodeSet & @CRLF
              $Output &= "CurrentLanguage: " & $objItem.CurrentLanguage & @CRLF
              $Output &= "Description: " & $objItem.Description & @CRLF
              $Output &= "EmbeddedControllerMajorVersion: " & $objItem.EmbeddedControllerMajorVersion & @CRLF
              $Output &= "EmbeddedControllerMinorVersion: " & $objItem.EmbeddedControllerMinorVersion & @CRLF
              $Output &= "IdentificationCode: " & $objItem.IdentificationCode & @CRLF
              $Output &= "InstallableLanguages: " & $objItem.InstallableLanguages & @CRLF
              $Output &= "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
              $Output &= "LanguageEdition: " & $objItem.LanguageEdition & @CRLF
                     Local $strListOfLanguages = $objItem.ListOfLanguages(0)
              $Output &= "ListOfLanguages: " & $strListOfLanguages & @CRLF
              $Output &= "Manufacturer: " & $objItem.Manufacturer & @CRLF
              $Output &= "Name: " & $objItem.Name & @CRLF
              $Output &= "OtherTargetOS: " & $objItem.OtherTargetOS & @CRLF
              $Output &= "PrimaryBIOS: " & $objItem.PrimaryBIOS & @CRLF
              $Output &= "ReleaseDate: " & WMIDateStringToDate($objItem.ReleaseDate) & @CRLF
              $Output &= "SerialNumber: " & $objItem.SerialNumber & @CRLF
              $Output &= "SMBIOSBIOSVersion: " & $objItem.SMBIOSBIOSVersion & @CRLF
              $Output &= "SMBIOSMajorVersion: " & $objItem.SMBIOSMajorVersion & @CRLF
              $Output &= "SMBIOSMinorVersion: " & $objItem.SMBIOSMinorVersion & @CRLF
              $Output &= "SMBIOSPresent: " & $objItem.SMBIOSPresent & @CRLF
              $Output &= "SoftwareElementID: " & $objItem.SoftwareElementID & @CRLF
              $Output &= "SoftwareElementState: " & $objItem.SoftwareElementState & @CRLF
              $Output &= "Status: " & $objItem.Status & @CRLF
              $Output &= "SystemBiosMajorVersion: " & $objItem.SystemBiosMajorVersion & @CRLF
              $Output &= "SystemBiosMinorVersion: " & $objItem.SystemBiosMinorVersion & @CRLF
              $Output &= "TargetOperatingSystem: " & $objItem.TargetOperatingSystem & @CRLF
              $Output &= "Version: " & $objItem.Version & @CRLF
              if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop
              $Output=""
           Next
        Else
           Msgbox(0,"WMI 输出","没有在类 " & "Win32_BIOS" & "中找到WMI对象" )
        Endif
EndFunc


Func WMIDateStringToDate($dtmDate)
        Return (StringMid($dtmDate, 5, 2) & "/" & _
        StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _
        & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2))
EndFunc

您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-25 08:49 , Processed in 0.103738 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表