py-kms icon indicating copy to clipboard operation
py-kms copied to clipboard

Windows Server 2022

Open xXcodgerXx opened this issue 4 years ago • 30 comments

Using the GVLK keys provided by MS I was unable to activate Server 2022 build 20344 (any edition) using pykms.

Windows Server 2022 Datacenter | WX4NM-KYWYW-QJJR4-XV3QB-6VM33 Windows Server 2022 Standard | VDYBN-27WPP-V4HQT-9VMD4-VMK7H

I am able to activate all other Windows and Office software on pykms without any problems.

Thanks for your time.

It gets this far

							Client sending

Server received RPC Bind Request !!! <===============

Server parsing RPC Bind Request...

Server generating RPC Bind Response...

							Client receiving

Server sending RPC Bind Response... ===============>

RPC Bind acknowledged !!!

							Client sending

Server received RPC Activation Request !!! <===============

Server parsing RPC Activation Request...

Server processing KMS Activation Request...

Module 'tzlocal' not available ! Request time not localized.

xXcodgerXx avatar Jun 18 '21 04:06 xXcodgerXx

And you have not installed tzdata, just to make sure?

simonmicro avatar Jun 18 '21 20:06 simonmicro

Those new products are not in the KmsDataBase.xml file yet, so it's right that they don't work ! If you can provide pkeyconfig data for your pre-releases...

SystemRage avatar Jun 18 '21 22:06 SystemRage

Thank you for the replies.

I have not installed tzdata, when activating other Windows products, I get

Module 'tzlocal' not available ! Request time not localized.

during the activation process but it just continues and activates.

@SystemRage

I am kind of new to this and have no idea how to get the pkeyconfig data from the pre-release.

xXcodgerXx avatar Jun 19 '21 02:06 xXcodgerXx

Same here. I already installed tzlocal with pip, but windows server 2022 activation doesnt work.

[root@private py-kms]# python3 pykms_Server.py 0.0.0.0 1688 -V DEBUG -F pykmslog/pk.log

                                                            Client sending

Server received RPC Bind Request !!! <===============

Server parsing RPC Bind Request...

Server generating RPC Bind Response...

                                                            Client receiving

Server sending RPC Bind Response... ===============>

RPC Bind acknowledged !!!

                                                            Client sending

Server received RPC Activation Request !!! <===============

Server parsing RPC Activation Request...

Server processing KMS Activation Request...

^C [root@private py-kms]# cat pykmslog/pk.log Sun, 20 Jun 2021 02:19:25 INFO TCP server listening at 0.0.0.0 on port 1688 Sun, 20 Jun 2021 02:19:25 INFO HWID: 364F463A8863D35F Sun, 20 Jun 2021 02:19:37 INFO Connection accepted: A.A.A.A:64619 Sun, 20 Jun 2021 02:19:37 INFO RPC bind request received. Sun, 20 Jun 2021 02:19:37 DEBUG RPC Bind Request Bytes:

                               05000b1310000000a000000002000000d016d0160000000003000000000001007521c8514e845047b0d8ec255555bc060100
                               0000045d888aeb1cc9119fe808002b10486002000000010001007521c8514e845047b0d8ec255555bc060100000033057171
                               babe37498319b5dbef9ccc3601000000020001007521c8514e845047b0d8ec255555bc06010000002c1cb76c129840450300
                               00000000000001000000

Sun, 20 Jun 2021 02:19:37 DEBUG RPC Bind Request:

                               MSRPCHeader
                               ver_major: {5}
                               ver_minor: {0}
                               type: {11}
                               flags: {19}
                               representation: {16}
                               frag_len: {160}
                               auth_len: {0}
                               call_id: {2}
                               dataLen: {144}
                               pduData: {b'\xd0\x16\xd0\x16\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x01\x00u!\xc8QN\x84PG\xb0\xd8\x
                               ec%UU\xbc\x06\x01\x00\x00\x00\x04]\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00+\x10H`\x02\x00\x00\x00\x0
                               1\x00\x01\x00u!\xc8QN\x84PG\xb0\xd8\xec%UU\xbc\x06\x01\x00\x00\x003\x05qq\xba\xbe7I\x83\x19\xb5\xdb\
                               xef\x9c\xcc6\x01\x00\x00\x00\x02\x00\x01\x00u!\xc8QN\x84PG\xb0\xd8\xec%UU\xbc\x06\x01\x00\x00\x00,\x
                               1c\xb7l\x12\x98@E\x03\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00'}
                               _pad: {0}
                               pad: {''}
                               _sec_trailer: {0}
                               sec_trailer: {''}
                               auth_dataLen: {0}
                               auth_data: {''}

                               MSRPCBind
                               max_tfrag: {5840}
                               max_rfrag: {5840}
                               assoc_group: {0}
                               ctx_num: {3}
                               Reserved: {0}
                               Reserved2: {0}
                               _ctx_items: {132}
                               ctx_items: {<pykms_RpcBind.MSRPCBind.CtxItemArray object at 0x7fa4f98ca978>}

Sun, 20 Jun 2021 02:19:37 DEBUG RPC Bind Response:

                               MSRPCBindAck
                               ver_major: {5}
                               ver_minor: {0}
                               type: {12}
                               flags: {19}
                               representation: {16}
                               frag_len: {108}
                               auth_len: {0}
                               call_id: {2}
                               max_tfrag: {5840}
                               max_rfrag: {5840}
                               assoc_group: {274972479}
                               SecondaryAddrLen: {5}
                               SecondaryAddr: {'1688'}
                               Pad: {b'\x00'}
                               ctx_num: {3}
                               ctx_items: {b'\x00\x00\x00\x00\x04]\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00+\x10H`\x02\x00\x00\x00\x
                               02\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x
                               00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}
                               sec_trailer: {b''}
                               auth_data: {b''}
                               pad: {b''}
                               pduData: {b''}

Sun, 20 Jun 2021 02:19:37 DEBUG RPC Bind Response Bytes:

                               05000c13100000006c00000002000000d016d0163fbf631005003136383800000300000000000000045d888aeb1cc9119fe8
                               08002b1048600200000002000200000000000000000000000000000000000000000003000300000000000000000000000000
                               0000000000000000

Sun, 20 Jun 2021 02:19:37 INFO RPC bind acknowledged. Sun, 20 Jun 2021 02:19:37 INFO Received activation request. Sun, 20 Jun 2021 02:19:37 DEBUG RPC Message Request Bytes:

                               050000031000000024010000020000000c0100000000000004010000040100000000060077c2a71717fce0943715cef95cab
                               8b7449ee194b603778e3d7449275a743e779bb6de4f8ce3a2128ca87f07bb7f39085a78742f8ceda309523066d5677e27fc5
                               e8d242d1ca25fb02ca3a6d17d2712e027c1a25b1763cfaaa94db878fd0cc3238b6f039c03510707173e32c7bf07a683a52f6
                               ec86bfbbd1cc6a872445a96446cdbdfc2e10812ba8f0605f1c550f49e2cace495814f478628ddccf403221df79e202e39d7a
                               45593a040cad005e57598401f31fffcf7adebb755b8f4bd01e5fbe72da4489d0975fe445360a9dff7d1e3e3b1a960eb49bb5
                               fed3ca0dc3adb077ff113cc7ebbd51467116dd9e6035e76402585b2aebe5b22423f7bead3cb0ab2d0951

Sun, 20 Jun 2021 02:19:37 DEBUG RPC Message Request:

                               MSRPCRequestHeader
                               ver_major: {5}
                               ver_minor: {0}
                               type: {0}
                               flags: {3}
                               representation: {16}
                               frag_len: {292}
                               auth_len: {0}
                               call_id: {2}
                               alloc_hint: {268}
                               ctx_id: {0}
                               op_num: {0}
                               _uuid: {0}
                               uuid: {''}
                               dataLen: {268}
                               pduData: {b'\x04\x01\x00\x00\x04\x01\x00\x00\x00\x00\x06\x00w\xc2\xa7\x17\x17\xfc\xe0\x947\x15\xce\x
                               f9\\\xab\x8btI\xee\x19K`7x\xe3\xd7D\x92u\xa7C\xe7y\xbbm\xe4\xf8\xce:!(\xca\x87\xf0{\xb7\xf3\x90\x85\
                               xa7\x87B\xf8\xce\xda0\x95#\x06mVw\xe2\x7f\xc5\xe8\xd2B\xd1\xca%\xfb\x02\xca:m\x17\xd2q.\x02|\x1a%\xb
                               1v<\xfa\xaa\x94\xdb\x87\x8f\xd0\xcc28\xb6\xf09\xc05\x10pqs\xe3,{\xf0zh:R\xf6\xec\x86\xbf\xbb\xd1\xcc
                               j\x87$E\xa9dF\xcd\xbd\xfc.\x10\x81+\xa8\xf0`_\x1cU\x0fI\xe2\xca\xceIX\x14\xf4xb\x8d\xdc\xcf@2!\xdfy\
                               xe2\x02\xe3\x9dzEY:\x04\x0c\xad\x00^WY\x84\x01\xf3\x1f\xff\xcfz\xde\xbbu[\x8fK\xd0\x1e_\xber\xdaD\x8
                               9\xd0\x97_\xe4E6\n\x9d\xff}\x1e>;\x1a\x96\x0e\xb4\x9b\xb5\xfe\xd3\xca\r\xc3\xad\xb0w\xff\x11<\xc7\xe
                               b\xbdQFq\x16\xdd\x9e`5\xe7d\x02X[*\xeb\xe5\xb2$#\xf7\xbe\xad<\xb0\xab-\tQ'}
                               _pad: {0}
                               pad: {''}
                               _sec_trailer: {0}
                               sec_trailer: {''}
                               auth_dataLen: {0}
                               auth_data: {''}

Sun, 20 Jun 2021 02:19:37 INFO Received V6 request on Sun Jun 20 02:19:37 2021. Sun, 20 Jun 2021 02:19:37 DEBUG KMS Request Bytes:

                               000006000100000005000000000000003427c95582d6714d983ed6ec3f16059f9ffc6cef5d8cac449aadde6a2ea0ae03e463
                               42b7920fc646bcf8c11d5efe2959fe1013ce0078f84aa7b055d49854dedc050000005cd52cb67a65d7010000000000000000
                               0000000000000000570049004e002d0046004b005200410054003900330039004c0051004e0000006f007700730028005200
                               29002c0020005300650072007600650072004400610074006100630065006e00740065007200200065006400690074006900
                               6f006e000000000000000000000000000000000000000000000000000000000000000000

Sun, 20 Jun 2021 02:19:37 DEBUG KMS Request:

                               kmsRequestStruct
                               versionMinor: {0}
                               versionMajor: {6}
                               isClientVm: {1}
                               licenseStatus: {5}
                               graceTime: {0}
                               applicationId:{
                                   raw: {b"4'\xc9U\x82\xd6qM\x98>\xd6\xec?\x16\x05\x9f"}
                               }
                               skuId:{
                                   raw: {b'\x9f\xfcl\xef]\x8c\xacD\x9a\xad\xdej.\xa0\xae\x03'}
                               }
                               kmsCountedId:{
                                   raw: {b'\xe4cB\xb7\x92\x0f\xc6F\xbc\xf8\xc1\x1d^\xfe)Y'}
                               }
                               clientMachineId:{
                                   raw: {b'\xfe\x10\x13\xce\x00x\xf8J\xa7\xb0U\xd4\x98T\xde\xdc'}
                               }
                               requiredClientCount: {5}
                               requestTime: {132686291747525980}
                               previousClientMachineId:{
                                   raw: {b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}
                               }
                               machineName: {b'W\x00I\x00N\x00-\x00F\x00K\x00R\x00A\x00T\x009\x003\x009\x00L\x00Q\x00N\x00'}
                               _mnPad: {96}
                               mnPad: {b'o\x00w\x00s\x00(\x00R\x00)\x00,\x00 \x00S\x00e\x00r\x00v\x00e\x00r\x00D\x00a\x00t\x00a\x00
                               c\x00e\x00n\x00t\x00e\x00r\x00 \x00e\x00d\x00i\x00t\x00i\x00o\x00n\x00\x00\x00\x00\x00\x00\x00\x00\x
                               00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}

Sun, 20 Jun 2021 02:19:37 INFO Connection closed: A.A.A.A:64619

(Client ip to A.A.A.A)

DoyunShin avatar Jun 20 '21 02:06 DoyunShin

pk.log (Reuploaded because of ip address)

DoyunShin avatar Jun 20 '21 02:06 DoyunShin

Those new products are not in the KmsDataBase.xml file yet, so it's right that they don't work ! If you can provide pkeyconfig data for your pre-releases...

Windows Server 2022: pkeyconfig.zip

D3fau4 avatar Jun 30 '21 19:06 D3fau4

I correct myself. There shouldn't be any need to modify KmsDataBase.xml. @D3fau4 However very good for an update of the .xml file !

line 164 of pykms_Base.py add this:

             # Get a name for SkuId, AppId.        
             kmsdb = kmsDB2Dict()
+           appName, skuName = str(applicationId), str(skuId)
             appitems = kmsdb[2]
             for appitem in appitems:

@xXcodgerXx and/or @DoyunShin can test this temp patch. If works, then I'll create a clean PR with some other fix, also adding new pkeyconfig data provided by @D3fau4.

SystemRage avatar Jun 30 '21 21:06 SystemRage

I correct myself. There shouldn't be any need to modify KmsDataBase.xml. @D3fau4 However very good for an update of the .xml file !

line 164 of pykms_Base.py add this:

             # Get a name for SkuId, AppId.        
             kmsdb = kmsDB2Dict()
+           appName, skuName = str(applicationId), str(skuId)
             appitems = kmsdb[2]
             for appitem in appitems:

@xXcodgerXx and/or @DoyunShin can test this temp patch. If works, then I'll create a clean PR with some other fix, also adding new pkeyconfig data provided by @D3fau4.

also i can give you the pkeyconfig for Win11 and Office 2021 if you want.

D3fau4 avatar Jun 30 '21 21:06 D3fau4

Sure !

SystemRage avatar Jun 30 '21 21:06 SystemRage

I correct myself. There shouldn't be any need to modify KmsDataBase.xml. @D3fau4 However very good for an update of the .xml file !

line 164 of pykms_Base.py add this:

             # Get a name for SkuId, AppId.        
             kmsdb = kmsDB2Dict()
+           appName, skuName = str(applicationId), str(skuId)
             appitems = kmsdb[2]
             for appitem in appitems:

@xXcodgerXx and/or @DoyunShin can test this temp patch. If works, then I'll create a clean PR with some other fix, also adding new pkeyconfig data provided by @D3fau4.

I added that at line 164 and I could not activate anything.

Perhaps I did something wrong. I just pasted that in at line 164 with and without the plus sign using notepad+ and started pykms.

xXcodgerXx avatar Jul 01 '21 22:07 xXcodgerXx

@xXcodgerXx Align the lines obv, in this way:

             # Get a name for SkuId, AppId.        
             kmsdb = kmsDB2Dict()
             appName, skuName = str(applicationId), str(skuId)
             appitems = kmsdb[2]
             for appitem in appitems:

SystemRage avatar Jul 02 '21 22:07 SystemRage

Yep it works by adding only appName, skuName = str(applicationId), str(skuId)

DoyunShin avatar Jul 03 '21 00:07 DoyunShin

Yep it works by adding only appName, skuName = str(applicationId), str(skuId)

I tried adding just that and it worked for me too.

xXcodgerXx avatar Jul 03 '21 01:07 xXcodgerXx

Could the docker image please be updated with the modification for server 2022? (And this repository, too).. Thank you in advance.

ldti avatar Aug 20 '21 12:08 ldti

@ldti Docker has ended their support for their free Docker Hub and did not reinstated our builds yet. Therefore there is currently no way for us to push new build images until they fix that. You may open an separate issue for that and I'll may look further into that...

simonmicro avatar Aug 21 '21 19:08 simonmicro

I was not aware that docker hub is no longer free to upload to... I will open a new issue for this, just in case.

ldti avatar Aug 22 '21 10:08 ldti

Thoese standard and datacenter Product key are for preview version , Can we get the retail version product key for free ? or I have to buy it on keyingo.com , which I can afford it

tineny avatar Aug 26 '21 03:08 tineny

You can find kms client keys on Microsofts site, just Google it...

Sent from my iPad

On 26 Aug 2021, at 6:38, tineny @.***> wrote:



Thoese standard and datacenter Product key are for preview version , Can we get the retail version product key for free ? or I have to buy it on keyingo.com , which I can afford it

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/SystemRage/py-kms/issues/138#issuecomment-906067401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC3HYRIUEB5SEGP6C4ME7FTT6WZLZANCNFSM46447P4A. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

ldti avatar Aug 26 '21 04:08 ldti

Was an XML update required for 2022/11?

echodreamz avatar Sep 01 '21 04:09 echodreamz

No. Only the one line change.

Sent from my iPad

On 1 Sep 2021, at 7:07, Christopher York @.***> wrote:



Was an XML update required for 2022/11?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/SystemRage/py-kms/issues/138#issuecomment-909861905, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC3HYROEWMPVSAYE2WBNXL3T7WRHVANCNFSM46447P4A. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ldti avatar Sep 01 '21 04:09 ldti

Thanks @ldti - What key / product is it using from the XML?

echodreamz avatar Sep 01 '21 04:09 echodreamz

I'm not sure. I know I entered the kms client key for 2022, and it activated fine..

Sent from my iPad

On 1 Sep 2021, at 7:19, Christopher York @.***> wrote:



Thanks @ldtihttps://github.com/ldti - What key / product is it using from the XML?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/SystemRage/py-kms/issues/138#issuecomment-909867995, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC3HYRPJ62ZRXJHXN2KOZVDT7WSULANCNFSM46447P4A. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ldti avatar Sep 01 '21 04:09 ldti

@ldti Thanks again!

echodreamz avatar Sep 01 '21 04:09 echodreamz

@ldti Docker has ended their support for their free Docker Hub and did not reinstated our builds yet. Therefore there is currently no way for us to push new build images until they fix that. You may open an separate issue for that and I'll may look further into that...

Have you considered GHA for docker image builds?

thespad avatar Sep 01 '21 15:09 thespad

@TheSpad See #139 - yes! But currently everything hangs on @SystemRage as I do not like to make a fork pushing to the "official" image repo.

But okay: Let's make it simple. @SystemRage has time until 06-09-2021 until I will fork off, create a new organization and then fix those Docker builds on my own.

simonmicro avatar Sep 02 '21 10:09 simonmicro

It works.

muhammetunal avatar Sep 06 '21 15:09 muhammetunal

It worked for Office 2021 as well. Thanks!

1jtp8sobiu avatar Oct 05 '21 21:10 1jtp8sobiu

I correct myself. There shouldn't be any need to modify KmsDataBase.xml. @D3fau4 However very good for an update of the .xml file ! line 164 of pykms_Base.py add this:

             # Get a name for SkuId, AppId.        
             kmsdb = kmsDB2Dict()
+           appName, skuName = str(applicationId), str(skuId)
             appitems = kmsdb[2]
             for appitem in appitems:

@xXcodgerXx and/or @DoyunShin can test this temp patch. If works, then I'll create a clean PR with some other fix, also adding new pkeyconfig data provided by @D3fau4.

also i can give you the pkeyconfig for Win11 and Office 2021 if you want.

any news about win11 and office 2021?

fabriziopicconi avatar Oct 05 '21 21:10 fabriziopicconi

win 11 and office 2021(preview) works!

DoyunShin avatar Oct 05 '21 22:10 DoyunShin

It doesn't look like this has been added to a PR and merged yet.

bruor avatar Oct 05 '21 23:10 bruor