Support IPv4/IPv6 #86

This commit is contained in:
Matteo ℱan
2020-08-03 23:13:45 +02:00
parent 73965b1cdb
commit 5b328d20f4
2 changed files with 25 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ _py-kms_ is a port of node-kms created by [cyrozap](http://forums.mydigitallife.
- Microsoft Office 2016 ( Volume License )
- Microsoft Office 2019 ( Volume License )
- It's written in Python:
- tested with Python 3.6.7
- tested with Python 3.6.9
# Dependencies
- Python 3.x.
@@ -34,7 +34,7 @@ _py-kms_ is a port of node-kms created by [cyrozap](http://forums.mydigitallife.
- `sudo pip3 install tzlocal pysqlite3`
# Usage
- To start the server, execute `python3 pykms_Server.py [IPADDRESS] [PORT]`, the default _IPADDRESS_ is `::` ( all interfaces ) and the default _PORT_ is `1688`. Note that both the address and port are optional. Also note that you have to use an IPv6 address - even if you are just plan to use IPv4 (the kernel maps the incoming IPv4 requests automatically to IPv6), otherwise you will get unsupported address family exceptions!
- To start the server, execute `python3 pykms_Server.py [IPADDRESS] [PORT]`, the default _IPADDRESS_ is `0.0.0.0` ( all interfaces ) and the default _PORT_ is `1688`. Note that both the address and port are optional. It's allowed to use IPv4 and IPv6 addresses. If you have a IPv6-capable dual-stack OS, a dual-stack socket is created when using a IPv6 address.
- To run the client (only for testing purposes), use `python3 pykms_Client.py [IPADDRESS] [PORT]`, with the same defaults of `pykms_Server.py`.
- To show the help pages type: `python3 pykms_Server.py -h` and `python3 pykms_Client.py -h`.
- To generate a random HWID use `-w` option: `python3 pykms_Server.py -w RANDOM`.