ThunderEX / py-kms

A KMS server written in python.
Other
395 stars 113 forks source link

There is a problem running in windows #28

Closed MoeGakuen closed 5 years ago

MoeGakuen commented 5 years ago

Windows OS version: 10.0.17134.441(1803) x64 Python version for Windows: 2.7.15


Run python server.py to start the server and execute the activation command on Windows.

11


Increasing debugging parameter errors will change. Run python server.py -d to start the server.

22

TCP server listening at 0.0.0.0 on port 1688.
Connection accepted: 127.0.0.1:50514
RPC bind request received.
('RPC Bind Request Bytes:', '05000b1310000000a000000002000000d016d0160000000003000000000001007521c8514e845047b0d8ec255555bc0601000000045d888aeb1cc9119fe808002b10486002000000010001007521c8514e845047b0d8ec255555bc060100000033057171babe37498319b5dbef9ccc3601000000020001007521c8514e845047b0d8ec255555bc06010000002c1cb76c12984045030000000000000001000000')

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: {'\xd0\x16\xd0\x16\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x01\x00u!\xc8QN\x84PG\xb0\xd8\xec%UU\xbc\x06\x01\x00\x00\x00\x04]\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00+\x10H`\x02\x00\x00\x00\x01\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,\x1c\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: {   u!萉N凱G柏?UU?   ]垔?? +H`     u!萉N凱G柏?UU?   3qq壕7I?帝餃?     u!萉N凱G柏?UU?   ,穕楡E          }Connection closed: 127.0.0.1:50514
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 50514)
Traceback (most recent call last):
  File "c:\program files\python2.7\lib\SocketServer.py", line 596, in process_request_thread
    self.finish_request(request, client_address)
  File "c:\program files\python2.7\lib\SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "c:\program files\python2.7\lib\SocketServer.py", line 652, in __init__
    self.handle()
  File "server.py", line 135, in handle
    res = handler.populate().__bytes__()
  File "D:\UserData\Desktop\py-kms-master\rpcBase.py", line 20, in populate
    return self.generateResponse(self.parseRequest())
  File "D:\UserData\Desktop\py-kms-master\rpcBind.py", line 91, in parseRequest
    print("RPC Bind Request:", request.dump(), MSRPCBind(request['pduData']).dump())
  File "D:\UserData\Desktop\py-kms-master\structure.py", line 568, in dump
    print("%s%s: {%r}" % (ind,i,self[i]))
IOError: [Errno 0] Error
----------------------------------------

But there is only one problem in testing in win 10 (1803 - 17134.345) virtual machine, and there will be no problem without debugging parameter (-d).

Running on linux system without any problems.

ThunderEX commented 5 years ago

Can you check if my recent update fix your issue of debug output?

ThunderEX commented 5 years ago

Regarding issue of 0x8007000d, I remember that some are due to running kms server on the same PC you want to activate. Are you encountering such situation? If not, you can paste your log here and I'll check again.

MoeGakuen commented 5 years ago

Debugging issue has been resolved. 0x8007000d is indeed the same PC problem. Thank you very much.