Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0x8007000D Error #23

Closed
testcaoy7 opened this issue May 6, 2019 · 10 comments
Closed

0x8007000D Error #23

testcaoy7 opened this issue May 6, 2019 · 10 comments

Comments

@testcaoy7
Copy link

I have tried both python2 and python3 under Windows. I ran "python server.py 127.0.0.1" and tried to activate Windows. However, Windows can not be activated. It will throw a 0x8007000D error. The py-kms I used is the latest git version.

The problem only persists when running server.py under Windows version of python. I ran py-kms under Linux and Windows can be successfully activated when the KMS server is pointed to the Linux machine.

@testcaoy7
Copy link
Author

This error persists in Windows 10. The version I used is Windows 10 Enterprise v1903.
I also tried using py-kms under Windows 7 and Windows 7 Enterprise can be activated via 127.0.0.1.

@ghost
Copy link

ghost commented May 8, 2019

I have the same issue here some more details

slmgr -ato 

report

Activating Windows(R), Enterprise edition (73111121-5638-40f6-bc11-f1d7b0d64300) ...
Error: 0x8007000D The data is invalid.  (SWbemObjectEx)

and with server.py -w random -v DEBUG I have this log:

Wed, 08 May 2019 15:06:50 INFO     TCP server listening at 0.0.0.0 on port 1688.
Wed, 08 May 2019 15:06:50 INFO     HWID: 6CDE22CDCCF845FF
Wed, 08 May 2019 15:07:07 INFO     Connection accepted: 127.0.0.1:49691
Wed, 08 May 2019 15:07:07 INFO     RPC bind request received.
Wed, 08 May 2019 15:07:07 DEBUG    RPC Bind Request Bytes: 

								   05000b1310000000a000000002000000d016d0160000000003000000000001007521c8514e845047b0d8ec255555bc060100
								   0000045d888aeb1cc9119fe808002b10486002000000010001007521c8514e845047b0d8ec255555bc060100000033057171
								   babe37498319b5dbef9ccc3601000000020001007521c8514e845047b0d8ec255555bc06010000002c1cb76c129840450300
								   00000000000001000000

Wed, 08 May 2019 15:07:07 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: {<rpcBind.MSRPCBind.CtxItemArray object at 0x02D4CA50>}

Wed, 08 May 2019 15:07:07 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''}
								   pduData: {b''}
								   pad: {b''}

Wed, 08 May 2019 15:07:07 DEBUG    RPC Bind Response Bytes: 

								   05000c13100000006c00000002000000d016d0163fbf631005003136383800000300000000000000045d888aeb1cc9119fe8
								   08002b1048600200000002000200000000000000000000000000000000000000000003000300000000000000000000000000
								   0000000000000000

Wed, 08 May 2019 15:07:07 INFO     RPC bind acknowledged.
Wed, 08 May 2019 15:07:07 INFO     Received activation request.
Wed, 08 May 2019 15:07:07 DEBUG    RPC Message Request Bytes: 

								   050000031000000024010000020000000c01000000000000040100000401000000000600c258659ba37e667b350c25a04061
								   c78efd910fce86995778a019f6399e6f484b7cf009a840aa6267a88e3dcbf25c044796d88e7210c57f88604778934f2e542c
								   05123d71633cd69109f5eef8379764d68fc659ea8b95896a984d32d4c1065536cea7fa55fac238d06f82874093a01f1972bd
								   de87f9ed6a0a6dc71168c787b1e99e669cdd017f7904babcb0ecef46d419c8a04fb5b499fa7c5db8bc7b5028120aff0d97b5
								   b47ff7b5f978afa110bf40bdbdff6f3d5f9d7563d28eb1a05833f07587a0556e04a26f94eb118a4d892db7167be76b3b2824
								   037e820a2300539326d95f0b780a8de503c207e92aed55104b6d6931b906ee8a8d14df14d7acb85dc14f

Wed, 08 May 2019 15:07:07 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\x00\xc2Xe\x9b\xa3~f{5\x0c%\xa0@a\xc7\x8e\xf
								   d\x91\x0f\xce\x86\x99Wx\xa0\x19\xf69\x9eoHK|\xf0\t\xa8@\xaabg\xa8\x8e=\xcb\xf2\\\x04G\x96\xd8\x8er\x
								   10\xc5\x7f\x88`Gx\x93O.T,\x05\x12=qc<\xd6\x91\t\xf5\xee\xf87\x97d\xd6\x8f\xc6Y\xea\x8b\x95\x89j\x98M
								   2\xd4\xc1\x06U6\xce\xa7\xfaU\xfa\xc28\xd0o\x82\x87@\x93\xa0\x1f\x19r\xbd\xde\x87\xf9\xedj\nm\xc7\x11
								   h\xc7\x87\xb1\xe9\x9ef\x9c\xdd\x01\x7fy\x04\xba\xbc\xb0\xec\xefF\xd4\x19\xc8\xa0O\xb5\xb4\x99\xfa|]\
								   xb8\xbc{P(\x12\n\xff\r\x97\xb5\xb4\x7f\xf7\xb5\xf9x\xaf\xa1\x10\xbf@\xbd\xbd\xffo=_\x9duc\xd2\x8e\xb
								   1\xa0X3\xf0u\x87\xa0Un\x04\xa2o\x94\xeb\x11\x8aM\x89-\xb7\x16{\xe7k;($\x03~\x82\n#\x00S\x93&\xd9_\x0
								   bx\n\x8d\xe5\x03\xc2\x07\xe9*\xedU\x10Kmi1\xb9\x06\xee\x8a\x8d\x14\xdf\x14\xd7\xac\xb8]\xc1O'}
								   _pad: {0}
								   pad: {''}
								   _sec_trailer: {0}
								   sec_trailer: {''}
								   auth_dataLen: {0}
								   auth_data: {''}

Wed, 08 May 2019 15:07:07 INFO     Received V6 request on Wed May 08 15:07:07 2019.
Wed, 08 May 2019 15:07:07 DEBUG    KMS Request Bytes: 

								   000006000100000005000000000000003427c95582d6714d983ed6ec3f16059f211111733856f640bc11f1d7b0d643004f13
								   e258118e174d9cb291069c15114820ff0456d29ee345908cf0ab52af415119000000f3c815ef9e05d501fe85b0c80ba8154f
								   b940cf1e13ef67bd4400450053004b0054004f0050002d004f0049003700470053004e00560000002e006d00690063007200
								   6f0073006f00660074002e0063006f006d002f00440052004d002f00580072004d004c0032002f0053004c002f0076003200
								   22002f003e003c002f00720065006e00640065007200650072003e00000011dd81caeed7

Wed, 08 May 2019 15:07:07 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'!\x11\x11s8V\xf6@\xbc\x11\xf1\xd7\xb0\xd6C\x00'}
								   }
								   kmsCountedId:{
									   raw: {b'O\x13\xe2X\x11\x8e\x17M\x9c\xb2\x91\x06\x9c\x15\x11H'}
								   }
								   clientMachineId:{
									   raw: {b' \xff\x04V\xd2\x9e\xe3E\x90\x8c\xf0\xabR\xafAQ'}
								   }
								   requiredClientCount: {25}
								   requestTime: {132017944251451635}
								   previousClientMachineId:{
									   raw: {b'\xfe\x85\xb0\xc8\x0b\xa8\x15O\xb9@\xcf\x1e\x13\xefg\xbd'}
								   }
								   machineName: {b'D\x00E\x00S\x00K\x00T\x00O\x00P\x00-\x00O\x00I\x007\x00G\x00S\x00N\x00V\x00'}
								   _mnPad: {96}
								   mnPad: {b'.\x00m\x00i\x00c\x00r\x00o\x00s\x00o\x00f\x00t\x00.\x00c\x00o\x00m\x00/\x00D\x00R\x00M\x00
								   /\x00X\x00r\x00M\x00L\x002\x00/\x00S\x00L\x00/\x00v\x002\x00"\x00/\x00>\x00<\x00/\x00r\x00e\x00n\x00
								   d\x00e\x00r\x00e\x00r\x00>\x00\x00\x00\x11\xdd\x81\xca\xee\xd7'}

Wed, 08 May 2019 15:07:07 WARNING  Module "tzlocal" not available ! Request time not localized.
Wed, 08 May 2019 15:07:07 INFO     Machine Name: DESKTOP-OI7GSNV
Wed, 08 May 2019 15:07:07 INFO     Client Machine ID: 5604ff20-9ed2-45e3-908c-f0ab52af4151
Wed, 08 May 2019 15:07:07 INFO     Application ID: Windows
Wed, 08 May 2019 15:07:07 INFO     SKU ID: Windows 10 Enterprise
Wed, 08 May 2019 15:07:07 INFO     License Status: Notifications Mode
Wed, 08 May 2019 15:07:07 INFO     Request Time: 2019-05-08 13:07:05  (UTC)
Wed, 08 May 2019 15:07:07 INFO     Server ePID: 03612-00206-393-078742-03-1033-14393.0000-2572018
Wed, 08 May 2019 15:07:07 INFO     KMS V6 Response: 

								   ResponseV5
								   bodyLength1: {260}
								   bodyLength2: {260}
								   versionMinor: {0}
								   versionMajor: {6}
								   salt: {b'\x17\xaf\x82\xb2ND;\xff"\x04\x8e<\xec\x0b\x0b\xe8'}
								   encrypted: {b'\xa7\x06\xc8E"8\xcd\x89~\xb6\x06\xebJ=\x14$f\xa1\x12Q\xa1]0\xfb~\xe2\x8bR4p!\x90\xe4\x
								   0f\xd7\xb4S\x1d\x90\x1f\xfba\xdc\x10\xfe\xdd\x11i\x17\xd1\x05\xb5\x9d\x18\x1c>y|\x03T\xa0iv\xae\x05\
								   xd9.\xb16c\xd2\xa6\x1c\xbcr\xcd\xbd}\n\xb2\xddl\x93st\x1fZ\xb9\x9a&\xees,m\xaf>\x89\x95\xe7\xb8\xda(
								   %\x19b\x10\x02\xefJ)\x89^\xd8O\xc6\x84\xe96\x0c\xb2\xfdx{C\x85\xcc\xb3B\xfe\xc1d\xa2/8\x03\xe0\xc8\x
								   99k\xc8\x01:\xa6\xe9Yz\xdb;^\x82\x0f\xfay\x13\xbex\x89\xd6\x86\xba\x1a\xffYKf@\xc0e\x89\x04\x1d\x97\
								   x8e_hi\x1c\xf0\xaeJ\xb9\x88\x02*TkX\xd2w\x01m!\xba\xc5\t\xbe\x1a\xf0\xe5\x13\x95e\xee\xb2l\xac\xd2\x
								   03F\xb3\x84]\xe2Yoa\xdc)\x17l\x94\x98\x0e\x02.\xae\xc5{+7\xfa\xb4\xf0\xf9a\x90<\xc3\x11\xd0'}
								   padding: {b'\x00\x00\x00\x00'}

Wed, 08 May 2019 15:07:07 INFO     KMS V6 Structure Bytes: 

								   0401000000000200040100000000060017af82b24e443bff22048e3cec0b0be8a706c8452238cd897eb606eb4a3d142466a1
								   1251a15d30fb7ee28b5234702190e40fd7b4531d901ffb61dc10fedd116917d105b59d181c3e797c0354a06976ae05d92eb1
								   3663d2a61cbc72cdbd7d0ab2dd6c9373741f5ab99a26ee732c6daf3e8995e7b8da282519621002ef4a29895ed84fc684e936
								   0cb2fd787b4385ccb342fec164a22f3803e0c8996bc8013aa6e9597adb3b5e820ffa7913be7889d686ba1aff594b6640c065
								   89041d978e5f68691cf0ae4ab988022a546b58d277016d21bac509be1af0e5139565eeb26cacd20346b3845de2596f61dc29
								   176c94980e022eaec57b2b37fab4f0f961903cc311d000000000

Wed, 08 May 2019 15:07:07 DEBUG    RPC Message Response: 

								   MSRPCRespHeader
								   ver_major: {5}
								   ver_minor: {0}
								   type: {2}
								   flags: {3}
								   representation: {16}
								   auth_len: {0}
								   call_id: {2}
								   alloc_hint: {276}
								   ctx_id: {0}
								   cancel_count: {0}
								   pduData: {b'\x04\x01\x00\x00\x00\x00\x02\x00\x04\x01\x00\x00\x00\x00\x06\x00\x17\xaf\x82\xb2ND;\xff"
								   \x04\x8e<\xec\x0b\x0b\xe8\xa7\x06\xc8E"8\xcd\x89~\xb6\x06\xebJ=\x14$f\xa1\x12Q\xa1]0\xfb~\xe2\x8bR4p
								   !\x90\xe4\x0f\xd7\xb4S\x1d\x90\x1f\xfba\xdc\x10\xfe\xdd\x11i\x17\xd1\x05\xb5\x9d\x18\x1c>y|\x03T\xa0
								   iv\xae\x05\xd9.\xb16c\xd2\xa6\x1c\xbcr\xcd\xbd}\n\xb2\xddl\x93st\x1fZ\xb9\x9a&\xees,m\xaf>\x89\x95\x
								   e7\xb8\xda(%\x19b\x10\x02\xefJ)\x89^\xd8O\xc6\x84\xe96\x0c\xb2\xfdx{C\x85\xcc\xb3B\xfe\xc1d\xa2/8\x0
								   3\xe0\xc8\x99k\xc8\x01:\xa6\xe9Yz\xdb;^\x82\x0f\xfay\x13\xbex\x89\xd6\x86\xba\x1a\xffYKf@\xc0e\x89\x
								   04\x1d\x97\x8e_hi\x1c\xf0\xaeJ\xb9\x88\x02*TkX\xd2w\x01m!\xba\xc5\t\xbe\x1a\xf0\xe5\x13\x95e\xee\xb2
								   l\xac\xd2\x03F\xb3\x84]\xe2Yoa\xdc)\x17l\x94\x98\x0e\x02.\xae\xc5{+7\xfa\xb4\xf0\xf9a\x90<\xc3\x11\x
								   d0\x00\x00\x00\x00'}
								   pad: {b''}
								   sec_trailer: {b''}
								   auth_data: {b''}

Wed, 08 May 2019 15:07:07 DEBUG    RPC Message Response Bytes: 

								   05000203100000002c0100000200000014010000000000000401000000000200040100000000060017af82b24e443bff2204
								   8e3cec0b0be8a706c8452238cd897eb606eb4a3d142466a11251a15d30fb7ee28b5234702190e40fd7b4531d901ffb61dc10
								   fedd116917d105b59d181c3e797c0354a06976ae05d92eb13663d2a61cbc72cdbd7d0ab2dd6c9373741f5ab99a26ee732c6d
								   af3e8995e7b8da282519621002ef4a29895ed84fc684e9360cb2fd787b4385ccb342fec164a22f3803e0c8996bc8013aa6e9
								   597adb3b5e820ffa7913be7889d686ba1aff594b6640c06589041d978e5f68691cf0ae4ab988022a546b58d277016d21bac5
								   09be1af0e5139565eeb26cacd20346b3845de2596f61dc29176c94980e022eaec57b2b37fab4f0f961903cc311d000000000

Wed, 08 May 2019 15:07:07 INFO     Responded to activation request.
Wed, 08 May 2019 15:07:07 INFO     Connection closed: 127.0.0.1:49691

I have this issue only when the server run on the same machine. I tried to run on external windows 10 and the activaction works.

@testcaoy7
Copy link
Author

I can confirm that another KMS emulator, vlmcsd also have the same issue.
Maybe the problem belongs to Windows 10 instead of KMS emulator.

@SystemRage
Copy link
Owner

I think the problem is "auto-activation" (py-kms / vlmcsd server running on the same PC that should be activated).
Starting from Windows 8 (or maybe Windows 8.1) server and client must be two distinct PCs / devices.
See:
Wind4/vlmcsd#6
Wind4/vlmcsd#9

@firefinchdev
Copy link

I used WSL2 to start the server and it worked

@ganeshkakade
Copy link

ganeshkakade commented Feb 8, 2021

@firefinchdev Do you mean you have used WSL2 on the same machine or did you use two different machine to achieve activation?

@firefinchdev
Copy link

@firefinchdev Do you mean you have used WSL2 on the same machine or did you use two different machine to achieve activation?

I used WSL2 on the same machine.

@ganeshkakade
Copy link

@firefinchdev Do you mean you have used WSL2 on the same machine or did you use two different machine to achieve activation?

I used WSL2 on the same machine.

Thanks @firefinchdev . Now the issue is resolved

@firefinchdev
Copy link

@firefinchdev Do you mean you have used WSL2 on the same machine or did you use two different machine to achieve activation?

I used WSL2 on the same machine.

Thanks @firefinchdev . Now the issue is resolved

Resolved using WSL2 on same machine?

@ganeshkakade
Copy link

@firefinchdev Do you mean you have used WSL2 on the same machine or did you use two different machine to achieve activation?

I used WSL2 on the same machine.

Thanks @firefinchdev . Now the issue is resolved

Resolved using WSL2 on same machine?

Yes, used WSL2 on the same machine (hosted pykms_Server.py code as service on linux kernel) and used windows as client

edgd1er referenced this issue in edgd1er/py-kms Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants