SystemRage / py-kms

KMS Server Emulator written in Python
The Unlicense
2.04k stars 618 forks source link

ValueError: invalid literal for int() with base 10: ' #12

Closed Unkn0wn-MDCLXIV closed 5 years ago

Unkn0wn-MDCLXIV commented 5 years ago

When I try to activate my Windows 10 LTSC 2019 I get the following error message on the server:

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... ---------------------------------------- Exception happened during processing of request from ('192.168.178.109', 50768) Traceback (most recent call last): File "/usr/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock self.process_request(request, client_address) File "/usr/lib/python3.6/socketserver.py", line 348, in process_request self.finish_request(request, client_address) File "/usr/lib/python3.6/socketserver.py", line 361, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python3.6/socketserver.py", line 721, in __init__ self.handle() File "server.py", line 157, in handle res = str(handler.populate()).encode('latin-1') File "/opt/py-kms/py3-kms/rpcBase.py", line 42, in populate return self.generateResponse(self.parseRequest()) File "/opt/py-kms/py3-kms/rpcRequest.py", line 22, in generateResponse responseData = kmsBase.generateKmsResponseData(request['pduData'], self.config) File "/opt/py-kms/py3-kms/kmsBase.py", line 327, in generateKmsResponseData return messagehandler.executeRequestLogic() File "/opt/py-kms/py3-kms/kmsRequestV5.py", line 71, in executeRequestLogic responseBuffer = self.serverLogic(decrypted['request']) File "/opt/py-kms/py3-kms/kmsBase.py", line 176, in serverLogic count = int(kmsitem['NCountPolicy']) ValueError: invalid literal for int() with base 10: ''

zh2209645 commented 5 years ago

This is because some missing value in KmsDataBase.xml, just clone the least version.

Oratorian commented 5 years ago

This is after the least version

zh2209645 commented 5 years ago

If the least version still have this error, try this one: https://github.com/zh2209645/py-kms I tried to fix the error caused by the xml file.

Unkn0wn-MDCLXIV commented 5 years ago

If the least version still have this error, try this one: https://github.com/zh2209645/py-kms I tried to fix the error caused by the xml file.

That fixed the issue, thanks

taten14 commented 5 years ago

If the least version still have this error, try this one: https://github.com/zh2209645/py-kms I tried to fix the error caused by the xml file.

Fixed! Thanks!

Oratorian commented 5 years ago

Not fixed for me, I still get the 'Int() with base 10' error.

I cloned your repo and tried to run it. Same error

zh2209645 commented 5 years ago

Not fixed for me, I still get the 'Int() with base 10' error.

I cloned your repo and tried to run it. Same error

Please provide specific error message.

SystemRage commented 5 years ago

Ok! Fixed missing values in KmsDataBase.xml. Now works !

ricktendo commented 5 years ago

Confirmed, just re-activated Office 2019

C:\Program Files\Microsoft Office\Office16>cscript //Nologo ospp.vbs /act
---Processing--------------------------
---------------------------------------
Installed product key detected - attempting to activate the following product:
SKU ID: 5b5cf08f-b81a-431d-b080-3450d8620565
LICENSE NAME: Office 19, Office19VisioPro2019VL_KMS_Client_AE edition
LICENSE DESCRIPTION: Office 19, VOLUME_KMSCLIENT channel
Last 5 characters of installed product key: REDACTED
<Product activation successful>
---------------------------------------
Installed product key detected - attempting to activate the following product:
SKU ID: 85dd8b5f-eaa4-4af3-a628-cce9e77c9a03
LICENSE NAME: Office 19, Office19ProPlus2019VL_KMS_Client_AE edition
LICENSE DESCRIPTION: Office 19, VOLUME_KMSCLIENT channel
Last 5 characters of installed product key: REDACTED
<Product activation successful>
---------------------------------------
---------------------------------------
---Exiting-----------------------------