thunderex / py-kms Goto Github PK
View Code? Open in Web Editor NEWThis project forked from zengxs/py-kms
A KMS server written in python.
License: Other
This project forked from zengxs/py-kms
A KMS server written in python.
License: Other
正在激活 Windows(R), EnterpriseS edition (2d5a5a60-3040-48bf-beb0-fcd770c20ce0) ...
错误: 0xC004F074 软件授权服务报告无法激活计算机。无法联系任何密钥管理服务(KMS)。有关其他信息,请参阅应用程序事件日志。
Hi,
On a ipv4-only system (i.e ipv6 has been disabled even if it's available on the LAN) the server throws the following exception :
Traceback (most recent call last):
File "./server.py", line 126, in <module>
main()
File "./server.py", line 68, in main
socket.inet_pton(socket.AF_INET6, config['ip'])
socket.error: illegal IP address string passed to inet_pton
Command issued :
python ./server.py
Server configuration :
Slackware 14.1
Python 2.7.13
IP address is a private address from RFC1918 range.
Before the ipv6 commit, everything worked just fine.
Thanks.
especially hmac depend on hashlib
Hello,
MS has released the GVLK for LTSC 2019 and LTSC N 2019 on their website.
Here's the list :
Windows 10 entreprise LTSC 2019 | M7XTQ-FN8P6-TTKYV-9D4CC-J462D
skuid : 32d2fab3-e4a8-42c2-923b-4bf4fd13e6ee
Windows 10 entreprise N LTSC 2019 | 2NFX-8DJQP-P6BBQ-THF9C-7CG2H
skuid : 7103a333-b8c8-49cc-93ce-d37c09687f92
Cheers.
EDIT : I updated the post with the relevant skuid
refer to mitsuhiko/python-geoip#4
[Unit]
Description=KMS Service
After=multi-user.target
[email protected]
[Service]
Type=simple
ExecStart=/usr/bin/python /root/py-kms/server.py
StandardInput=tty-force
[Install]
WantedBy=multi-user.target
re depends on libpcre and which may be unavailable on some platform
oscrypto may enable faster, even AES-NI encrypt / decrypt.
When a win10 PC connected server (Python 2.6 on CentOS6), it has an "param error“. I have not recorded the details.
I upgraded Python to 2.7 on same server, then no error occurred.
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.
Increasing debugging parameter errors will change.
Run python server.py -d
to start the server.
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?� 3�qq壕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.
$ python client.py localhost
Connecting to localhost on port 1688...
Traceback (most recent call last):
File "client.py", line 239, in <module>
main()
File "client.py", line 63, in main
kmsRequest = createKmsRequest()
File "client.py", line 195, in createKmsRequest
handler = kmsRequestV4(None, config)
File "/kms/kmsBase.py", line 122, in __init__
if self.config['sqlite'] and self.config['dbSupport']:
KeyError: 'sqlite'
Is there a plan to support Office 2019 in the near future?
Starting the server with systemctl causes clients.db not to be stored in the program directory.
HELLO WILL IT BE POSSIBLE THAT IN THE GUI OF THE SERVER IT TELLS US FOR WHICH PRODUCT IT TO ATTRIBUTE AN ACTIVATION
THANK YOU
HI,Guys. I install the py-kms on my centos 7 server. I can use CMD to active my windows and office,but can not auto active.
I added _vlmcs on my DNSer ,but it still not work.
Anyone has the problem like this? How can fix it?
thinks
Tried all of the host options: localhost, 127.0.0.1, local-ip, hostname, different ports
Python 2.7.15 & Python3.6
Ubuntu 18.04 & 18.10
Connecting to 0.0.0.0 on port 1688...
Traceback (most recent call last):
File "client.py", line 239, in <module>
main()
File "client.py", line 40, in main
s = socket.create_connection((config['ip'], config['port']))
File "/usr/lib/python2.7/socket.py", line 575, in create_connection
raise err
socket.error: [Errno 111] Connection refused
How did hwid.kms19.gen.mk4's kms38 do it?
Are you likely to support it?
(The above content is from Google translation.)
Hi,
I've posted an issue at https://forums.mydigitallife.net/threads/emulated-kms-servers-on-non-windows-platforms.50234/page-63#post-1397488 where a PC at the end of an OpenVPN tunnel is no longer able to activate its licence. Using Wireshark at the server end I could see (I think) zero length replies from py-kms. I tried previous versions of py-kms and they were the same. Installing vlmscd worked.
I run py-kms with no additional parameters and it has worked for years so I suspect something M$ have done. It is the same from my LAN see the tcpdump below:
tcpdump:
[root@server bin]# tcpdump -i any port 1688 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
18:52:07.070978 IP 172.17.2.118.57242 > 172.17.2.1.nsjtp-data: Flags [S], seq 3930345398, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
18:52:07.071011 IP 172.17.2.1.nsjtp-data > 172.17.2.118.57242: Flags [S.], seq 3616433661, ack 3930345399, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
18:52:07.071164 IP 172.17.2.118.57242 > 172.17.2.1.nsjtp-data: Flags [.], ack 1, win 2053, length 0
18:52:07.071309 IP 172.17.2.118.57242 > 172.17.2.1.nsjtp-data: Flags [P.], seq 1:117, ack 1, win 2053, length 116
18:52:07.071323 IP 172.17.2.1.nsjtp-data > 172.17.2.118.57242: Flags [.], ack 117, win 229, length 0
18:52:07.073444 IP 172.17.2.1.nsjtp-data > 172.17.2.118.57242: Flags [P.], seq 1:85, ack 117, win 229, length 84
18:52:07.073570 IP 172.17.2.118.57242 > 172.17.2.1.nsjtp-data: Flags [.], ack 85, win 2052, length 0
18:52:07.073577 IP 172.17.2.118.57242 > 172.17.2.1.nsjtp-data: Flags [P.], seq 117:401, ack 85, win 2052, length 284
18:52:07.077392 IP 172.17.2.1.nsjtp-data > 172.17.2.118.57242: Flags [F.], seq 85, ack 401, win 237, length 0
18:52:07.078055 IP 172.17.2.118.57242 > 172.17.2.1.nsjtp-data: Flags [F.], seq 401, ack 86, win 2052, length 0
18:52:07.078077 IP 172.17.2.1.nsjtp-data > 172.17.2.118.57242: Flags [.], ack 402, win 237, length 0
172.17.2.1 is the server 172.17.2.118 is my client on my LAN.
Running py-kms interactively I get :
Sorry, but I don't know why the font has gone bold or the font size has changed.
already resolved, pls delete
Hi,
Are you planning to migrate to GitLab ?
We have to thanks MS for trashing yet another good website...
Cheers.
Please consider to create at least one stable release.
Hello,
With this new version of pyKMS, nothing works at all.
I'm providing you the log file from py-kms.
Output of /usr/bin/python /root/py-kms/server.py 10.0.0.254 -v
^CTraceback (most recent call last):
File "/root/py-kms/server.py", line 129, in
main()
File "/root/py-kms/server.py", line 78, in main
server.serve_forever()
File "/usr/lib/python2.7/SocketServer.py", line 231, in serve_forever
poll_interval)
File "/usr/lib/python2.7/SocketServer.py", line 150, in _eintr_retry
return func(*args)
KeyboardInterrupt
root@pykms:~# `
How this projects are different between each other except for micropython support?
Hello
There was an error using the latest version.
Here are the logs.
TCP server listening at 0.0.0.0 on port 1688.
Connection accepted: 127.0.0.1:5239
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!ǑNPG°٬%UU¼].+H`u!ǑNPG°٬%UU¼3qqº¾7Iµܯʶu!ǑNPG°٬%UU¼,·l@E}
('RPC Bind Request:', None, None)
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: {''}
ctx_num: {3}
ctx_items: {'\x00\x00\x00\x00\x04]\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00+\x10H`\x02\x00\x00\x00\x00\x00\x00\x003\x05qq\xba\xbe7I\x83\x19\xb5\xdb\xef\x9c\xcc6\x01\x00\x00\x00\x03\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}
sec_trailer: {''}
auth_data: {''}
pad: {''}
pduData: {''}
('RPC Bind Response:', None)
('RPC Bind Response Bytes:', '05000c13100000006c00000002000000d016d0163fbf631005003136383800000300000000000000045d888aeb1cc9119fe808002b104860020000000000000033057171babe37498319b5dbef9ccc3601000000030003000000000000000000000000000000000000000000')
RPC bind acknowledged.
XshellNo data received!
Connection closed: 127.0.0.1:5239
Connection accepted: 127.0.0.1:5240
No data received!
Connection closed: 127.0.0.1:5240
Connection accepted: 127.0.0.1:5241
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!ǑNPG°٬%UU¼].+H`u!ǑNPG°٬%UU¼3qqº¾7Iµܯʶu!ǑNPG°٬%UU¼,·l@E}
('RPC Bind Request:', None, None)
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: {''}
ctx_num: {3}
ctx_items: {'\x00\x00\x00\x00\x04]\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00+\x10H`\x02\x00\x00\x00\x00\x00\x00\x003\x05qq\xba\xbe7I\x83\x19\xb5\xdb\xef\x9c\xcc6\x01\x00\x00\x00\x03\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}
sec_trailer: {''}
auth_data: {''}
pad: {''}
pduData: {''}
('RPC Bind Response:', None)
('RPC Bind Response Bytes:', '05000c13100000006c00000002000000d016d0163fbf631005003136383800000300000000000000045d888aeb1cc9119fe808002b104860020000000000000033057171babe37498319b5dbef9ccc3601000000030003000000000000000000000000000000000000000000')
RPC bind acknowledged.
No data received!
Connection closed: 127.0.0.1:5241
XshellConnection accepted: 127.0.0.1:5242
No data received!
Connection closed: 127.0.0.1:5242
No data received
Hi ThunderEX
PY-KMS can‘t activate SW_DVD5_Office_Professional_Plus_2013_64Bit,but office2013_32bit is worked。Can you help me to fix it?
check 4f760cf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.