pkeyconfig Info Reader +Plus+ [v17.0]

Discussion in 'MDL Projects and Applications' started by Dark Vador, Apr 22, 2024.

  1. maxtorix

    maxtorix MDL Member

    Feb 3, 2010
    206
    186
    10
    Propranolol?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    #82 Dark Vador, Mar 14, 2025
    Last edited: Mar 14, 2025
    (OP)
    Probably age things :D
    with all the latest event's recently
    i don't believe Propranolol will help
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    did a few change's.
    and upload new version
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    #84 Dark Vador, May 2, 2025
    Last edited: May 2, 2025
    (OP)
    Just an idea
    Since I integrated libtsrorge dll file
    ( GetRandomKey function is very usefully )
    And it also contained pre legit mak keys & glvk legit keys
    So, I can add an Activate window option
    With all the mak keys people complain they blocked ( ZeroCID DON'T CARE )
    So this tool now, will read config files, Decode & encode keys,
    also generate keys using ref -or ID -or Product Name
    And also activate ID with legit block mak keys :D
    ( Bold = to do list ° ✓ )

    Beta Test File attaced

    upload_2025-5-2_8-8-25.png

    upload_2025-5-2_8-8-6.png

    upload_2025-5-2_8-8-41.png
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    #85 Dark Vador, May 5, 2025
    Last edited: May 5, 2025
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    #86 Dark Vador, May 10, 2025
    Last edited: May 13, 2025
    (OP)
    v11.4.0 [compiled at 13-05-25]
    Code:
    Update server SUPPORT {by pm67310}
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    Just say, the amount of line's i should *Manully* add
    so, press on this checkbox, will change, to HWID\KMS38 Mode **
    Initalize -> Select -> etc etc, and i actually manage to make a log
    still check it, 38's version work well, hwid, still check :D

    ** this gpt bot's are dummie's they don't solve your problem. (like people think)
    ** you need actually made it manually LOL. YES.

    upload_2025-5-23_15-5-46.png
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    #88 Dark Vador, May 26, 2025
    Last edited: May 26, 2025
    (OP)
    Code:
    # ***************************** #
    #  v12.2.0 compiled at 26-05-25 #
    # ***************************** #
    # Add hwid + kms38 Support
    # Add OS INFO + Fail Safe method
    
    upload_2025-5-26_21-29-3.png

    update new code to get OS INFO

    Code:
    .
    .
    function Get-RtlVersion {
        $size = 284
        $ptr = [System.Runtime.InteropServices.Marshal]::AllocHGlobal($size)
        try {
            [System.Runtime.InteropServices.Marshal]::WriteInt32($ptr, 0, $size)
            $asmName = New-Object Reflection.AssemblyName "RtlGetVersionAssembly"
            $asm = [AppDomain]::CurrentDomain.DefineDynamicAssembly($asmName, [Reflection.Emit.AssemblyBuilderAccess]::Run)
            $mod = $asm.DefineDynamicModule("RtlGetVersionModule")
            $tb = $mod.DefineType("NativeMethods", 
                [Reflection.TypeAttributes]::Public -bor [Reflection.TypeAttributes]::Abstract -bor [Reflection.TypeAttributes]::Sealed)
            $mb = $tb.DefinePInvokeMethod("RtlGetVersion", "ntdll.dll",
                [Reflection.MethodAttributes]::Public -bor [Reflection.MethodAttributes]::Static -bor [Reflection.MethodAttributes]::PinvokeImpl,
                [Reflection.CallingConventions]::Standard, [int], [IntPtr],
                [Runtime.InteropServices.CallingConvention]::Winapi, [Runtime.InteropServices.CharSet]::Unicode)
            $mb.SetImplementationFlags([Reflection.MethodImplAttributes]::PreserveSig)
            $type = $tb.CreateType()
            $status = $type::RtlGetVersion($ptr)
            if ($status -ne 0) { return $null }
            $major = [System.Runtime.InteropServices.Marshal]::ReadInt32($ptr, 4)
            $minor = [System.Runtime.InteropServices.Marshal]::ReadInt32($ptr, 8)
            $build = [System.Runtime.InteropServices.Marshal]::ReadInt32($ptr, 12)
            return [PSCustomObject]@{
                Major   = $major
                Minor   = $minor
                Build   = $build
                UBR     = $Global:ubr
                Version = @($major, $minor, $build)
            }
        }
        finally {
            if ($ptr -ne [IntPtr]::Zero) {
                [System.Runtime.InteropServices.Marshal]::FreeHGlobal($ptr)
            }
        }
    }
    $Global:CurrentVersion = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
    $Global:ubr = try { Get-ItemPropertyValue $reg -Name UBR -ErrorAction Stop } catch { 0 }
    try {
        $Global:osVersion = [PSCustomObject]@{
            Major   = [Marshal]::ReadInt32([IntPtr](0x7FFE0000 + 0x26C))
            Minor   = [Marshal]::ReadInt32([IntPtr](0x7FFE0000 + 0x270))
            Build   = [Marshal]::ReadInt32([IntPtr](0x7FFE0000 + 0x260))
            UBR     = $Global:ubr
            Version = 0x26C,0x270,0x260 | ForEach-Object { [Marshal]::ReadInt32([IntPtr](0x7FFE0000 + $_)) }
        }
    }
    catch {
        # Fallback: registry values
        try {
            $major = Get-ItemPropertyValue $Global:CurrentVersion -Name CurrentMajorVersionNumber -ErrorAction Stop
            $minor = Get-ItemPropertyValue $Global:CurrentVersion -Name CurrentMinorVersionNumber -ErrorAction Stop
            $build = Get-ItemPropertyValue $Global:CurrentVersion -Name CurrentBuildNumber -ErrorAction Stop
            $Global:osVersion = [PSCustomObject]@{
                Major   = [int]$major
                Minor   = [int]$minor
                Build   = [int]$build
                UBR     = $Global:ubr
                Version = @([int]$major, [int]$minor, [int]$build)
            }
        }
        catch {
            $Global:osVersion = Get-RtlVersion
            if ($null -eq $Global:osVersion) {
                Write-Warning "Failed to retrieve OS version from all methods."
                $Global:osVersion = [PSCustomObject]@{
                    Major = 0
                    Minor = 0
                    Build = 0
                    UBR = 0
                    Version = @(0,0,0)
                }
            }
        }
    }
    .
    .
    $Global:version = "$($Global:osVersion.Version -join '.').$($Global:osVersion.UBR)"
    .
    .
    .
    $statusBox.Text = "$os ($Global:arch) | Edition: $($Global:edition) | Version: $($Global:version) | Memory: $([math]::Round($Global:memory)) GB"
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    #89 Dark Vador, May 27, 2025
    Last edited: May 27, 2025
    (OP)
    v12.4.0 [compiled at 27-05-25]
    Code:
    Add hwid + kms38 Support
    Add OS INFO + Fail Safe method [v2]
    Add Edition ID API method
    
    SO, now editionID & Build Info
    are all fetch from Memory, Api, or DigitalProductID4
    and as fail safe, read from registry
    why not from registry ? i can be changed,
    or be put with fake data !

    upload_2025-5-27_21-48-46.png
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    Could you try load it with ise
    And paste log as code ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. pm67310

    pm67310 MDL Guru

    Sep 6, 2011
    3,632
    2,867
    120
    No update ? To use fixed custom key and no generated
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    #93 Dark Vador, May 28, 2025
    Last edited: May 28, 2025
    (OP)
    It is update
    It get value from api / memory
    Not registery
    For build info & product key
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    i upload fixed version, pkeyconfig_gui-v12.4.0.[2]
    edition id fetch order was change'd
    also, other little change's,
    should work little better

    New Order
    Code:
    # DigitalProductId4, WCHAR szEditionType[260];
    # You can also use the OperatingSystemSKU property of the Win32_OperatingSystem WMI class.
    # GetProductInfo function (sysinfoapi.h)
    # Key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion Propery: EditionID
    Get-ProductID - updated code
    Code:
    function Get-ProductID {
       
        # DigitalProductId4, WCHAR szEditionType[260];
        $DigitalProductId4 = ParseDigitalProductId4
        if ($DigitalProductId4 -and $DigitalProductId4.EditionType -and
            (-not [String]::IsNullOrEmpty($DigitalProductId4.EditionType))) {
            return $DigitalProductId4.EditionType
        }
    
        # You can also use the OperatingSystemSKU property of the Win32_OperatingSystem WMI class.
        [INT]$productType = 0
        $null = [INT]::TryParse($OperatingSystemInfo.ProductType,[ref]$productType)
        if ($productType -ne 0) {
            # Lookup in the table by converting the hex string to int
            $match = $Global:productTypeTable | Where-Object {
                [Convert]::ToInt32($_.DWORD, 16) -eq $productType
            }
            return $match.ProductID
        }
    
        # GetProductInfo function (sysinfoapi.h)
        $Method = [PSCustomObject]@{
            attributes = [MethodAttributes]::Public -bor [MethodAttributes]::Static -bor [MethodAttributes]::PinvokeImpl
            CallingConventions = [CallingConventions]::Standard
            nativeCallConv = [CallingConvention]::Winapi
            nativeCharSet = [CharSet]::Unicode
            ImplAttributes = [MethodImplAttributes]::PreserveSig
            TypeAttributes = [TypeAttributes]::Public -bor [TypeAttributes]::Abstract -bor [TypeAttributes]::Sealed
        }
        $asmName = New-Object AssemblyName "NativeOSVersionAssembly"
        $asm     = [AppDomain]::CurrentDomain.DefineDynamicAssembly($asmName, [AssemblyBuilderAccess]::Run::Run)
        $mod     = $asm.DefineDynamicModule("NativeOSVersionModule")
        $tb      = $mod.DefineType("NativeMethods", $Method.TypeAttributes)
        $tb.DefinePInvokeMethod("GetProductInfo", "Kernel32.dll",
            $Method.attributes, $Method.CallingConventions,
            [bool], [Type[]]@([UInt32], [UInt32], [UInt32], [UInt32], [IntPtr]), $Method.nativeCallConv, $Method.nativeCharSet
        ).SetImplementationFlags($Method.ImplAttributes)
        $type = $tb.CreateType()
        $productTypePtr = [Marshal]::AllocHGlobal(4)
        [Marshal]::WriteInt32($productTypePtr,0,0)
        try {
            $result = $false
            $result = $type::GetProductInfo(
                $OperatingSystemInfo.dwOSMajorVersion,
                $OperatingSystemInfo.dwOSMinorVersion,
                $OperatingSystemInfo.dwSpMajorVersion,
                $OperatingSystemInfo.dwSpMinorVersion,
                $productTypePtr)
    
            if (-not $result) {
               throw }
    
            [INT]$productType = [Marshal]::ReadInt32($productTypePtr)
            $match = $Global:productTypeTable | Where-Object {
                [Convert]::ToInt32($_.DWORD, 16) -eq $productType
            }
            return $match.ProductID
        }
        catch { }
        Finally {
            # Clean up by freeing the allocated memory
            [Marshal]::FreeHGlobal($productTypePtr)
        }
    
        # Key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion Propery: EditionID
        $EditionID = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name EditionID -ErrorAction SilentlyContinue).EditionID
        if ($EditionID) {
            return $EditionID }
    
        # just in case
        return $null
    }
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. haber123

    haber123 MDL Member

    Nov 5, 2009
    108
    44
    10

    Version 12.4 came up normally today. With or without json file works like it should. Thank you for this script.
     
  15. Low Level Perform

    Low Level Perform MDL Member

    Jul 21, 2024
    100
    95
    10
    pkeyconfig_gui-v12.5.0.rar
    encode key + decode key error
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    Show me the error
    What key .
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. Low Level Perform

    Low Level Perform MDL Member

    Jul 21, 2024
    100
    95
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Dark Vador

    Dark Vador X Æ A-12

    Feb 2, 2011
    4,605
    6,798
    150
    #100 Dark Vador, May 30, 2025
    Last edited: May 30, 2025
    (OP)
    upload new version, so,
    i try remove some extra thing's
    and add more `using`
    which in some way make sense

    but some are shared :D
    (LABEL can be found in 2 of my `using`)

    btw, in this version, the build info + editionID
    receive From API / MEMORY address, not for registry, which is less acurate
    function used from ntdll.dll, which is consider low level, undocumented dll
    most people will prefer to call kernel32.dll function, which call ntdll.dll internal function
    or avoid api, read from registry, which is very simple way, but,
    for research, why not try other ways :D

    EditionID from
    Code:
    PEB \ KUSER_SHARED_DATA {Memory Block's}
    RtlGetNtVersionNumbers -or RtlGetVersion
    
    Build info from
    Code:
    DigitalProductId4
    Win32_OperatingSystem.OperatingSystemSKU -or RtlGetProductInfo
    >> {decode table provide by abbodi1406} <<
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...