mirror of
https://github.com/Py-KMS-Organization/py-kms.git
synced 2025-12-06 07:42:00 +01:00
Compare commits
9 commits
b6a99091a8
...
ab5e7fb875
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab5e7fb875 | ||
|
|
465f4d14c7 | ||
|
|
71f31d4fd0 | ||
|
|
e60cc1b7e1 | ||
|
|
2ef58649f0 | ||
|
|
a639486121 | ||
|
|
0f58e9bb6f | ||
|
|
4f0b10c704 | ||
|
|
644d7be16c |
9
.github/workflows/bake_to_latest.yml
vendored
9
.github/workflows/bake_to_latest.yml
vendored
|
|
@ -21,6 +21,11 @@ jobs:
|
|||
platforms: all
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1.6.0
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1.10.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1.10.0
|
||||
with:
|
||||
|
|
@ -34,7 +39,7 @@ jobs:
|
|||
file: ./docker/docker-py3-kms/Dockerfile
|
||||
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
|
||||
push: true
|
||||
tags: ghcr.io/py-kms-organization/py-kms:python3
|
||||
tags: pykmsorg/py-kms:python3,ghcr.io/py-kms-organization/py-kms:python3
|
||||
build-args: |
|
||||
BUILD_COMMIT=${{ github.sha }}
|
||||
BUILD_BRANCH=${{ github.ref_name }}
|
||||
|
|
@ -45,7 +50,7 @@ jobs:
|
|||
file: ./docker/docker-py3-kms-minimal/Dockerfile
|
||||
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
|
||||
push: true
|
||||
tags: ghcr.io/py-kms-organization/py-kms:latest,ghcr.io/py-kms-organization/py-kms:minimal
|
||||
tags: pykmsorg/py-kms:latest,ghcr.io/py-kms-organization/py-kms:latest,pykmsorg/py-kms:minimal,ghcr.io/py-kms-organization/py-kms:minimal
|
||||
build-args: |
|
||||
BUILD_COMMIT=${{ github.sha }}
|
||||
BUILD_BRANCH=${{ github.ref_name }}
|
||||
|
|
|
|||
9
.github/workflows/bake_to_next.yml
vendored
9
.github/workflows/bake_to_next.yml
vendored
|
|
@ -21,6 +21,11 @@ jobs:
|
|||
platforms: all
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1.6.0
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1.10.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1.10.0
|
||||
with:
|
||||
|
|
@ -34,7 +39,7 @@ jobs:
|
|||
file: ./docker/docker-py3-kms/Dockerfile
|
||||
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
|
||||
push: true
|
||||
tags: ghcr.io/py-kms-organization/py-kms:python3-next
|
||||
tags: pykmsorg/py-kms:python3-next,ghcr.io/py-kms-organization/py-kms:python3-next
|
||||
build-args: |
|
||||
BUILD_COMMIT=${{ github.sha }}
|
||||
BUILD_BRANCH=${{ github.ref_name }}
|
||||
|
|
@ -45,7 +50,7 @@ jobs:
|
|||
file: ./docker/docker-py3-kms-minimal/Dockerfile
|
||||
platforms: linux/amd64,linux/386,linux/arm64/v8,linux/arm/v7,linux/arm/v6
|
||||
push: true
|
||||
tags: ghcr.io/py-kms-organization/py-kms:latest-next,ghcr.io/py-kms-organization/py-kms:minimal-next
|
||||
tags: pykmsorg/py-kms:latest-next,ghcr.io/py-kms-organization/py-kms:latest-next,pykmsorg/py-kms:minimal-next,ghcr.io/py-kms-organization/py-kms:minimal-next
|
||||
build-args: |
|
||||
BUILD_COMMIT=${{ github.sha }}
|
||||
BUILD_BRANCH=${{ github.ref_name }}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||

|
||||

|
||||

|
||||

|
||||

|
||||
***
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ What follows are some guides how to start the `pykms_Server.py` script, which pr
|
|||
You can simply manage a daemon that runs as a background process. This can be achieved by using any of the notes below or by writing your own solution.
|
||||
|
||||
### Docker
|
||||

|
||||

|
||||
|
||||
If you wish to get _py-kms_ just up and running without installing any dependencies or writing own scripts: Just use Docker !
|
||||
Docker also solves problems regarding the explicit IPv4 and IPv6 usage (it just supports both). The following
|
||||
command will download, "install" and start _py-kms_ and also keep it alive after any service disruption.
|
||||
|
|
|
|||
|
|
@ -88,44 +88,44 @@ You can read them using pkeyconfig-gui off MDL forums or Product Key Config. Rea
|
|||
<WinBuild BuildNumber="807" DisplayName="Windows NT 3.5" PlatformId="55041"/>
|
||||
-->
|
||||
<!-- Windows NT 3.51 -->
|
||||
<WinBuild BuildNumber="1057" ReleaseDate="1995-05-30T00:00:00Z" DisplayName="Windows NT 3.51" PlatformId="55041"/>
|
||||
<WinBuild BuildNumber="1057" ReleaseDate="1995-05-30T00:00:00Z" DisplayName="Windows NT 3.51" PlatformId="55041" />
|
||||
<!-- Windows NT 4.0 -->
|
||||
<WinBuild BuildNumber="1381" ReleaseDate="1996-07-29T00:00:00Z" DisplayName="Windows NT 4.0" PlatformId="55041"/>
|
||||
<WinBuild BuildNumber="1381" ReleaseDate="1996-07-29T00:00:00Z" DisplayName="Windows NT 4.0" PlatformId="55041" />
|
||||
<!-- Windows 2000 -->
|
||||
<WinBuild BuildNumber="2195" ReleaseDate="2000-02-17T00:00:00Z" DisplayName="Windows 2000" PlatformId="55041"/>
|
||||
<WinBuild BuildNumber="2195" ReleaseDate="2000-02-17T00:00:00Z" DisplayName="Windows 2000" PlatformId="55041" />
|
||||
<!-- Windows XP / Server 2003 -->
|
||||
<WinBuild BuildNumber="2600" ReleaseDate="2001-10-25T00:00:00Z" DisplayName="Windows XP 32-bit" PlatformId="55041"/>
|
||||
<WinBuild BuildNumber="3790" ReleaseDate="2003-03-28T00:00:00Z" DisplayName="Windows Server 2003 / XP 64-bit" PlatformId="55041" MayBeServer="true"/>
|
||||
<WinBuild BuildNumber="2600" ReleaseDate="2001-10-25T00:00:00Z" DisplayName="Windows XP 32-bit" PlatformId="55041" />
|
||||
<WinBuild BuildNumber="3790" ReleaseDate="2003-03-28T00:00:00Z" DisplayName="Windows Server 2003 / XP 64-bit" PlatformId="55041" MayBeServer="true" />
|
||||
<!-- Windows Vista / Server 2008 -->
|
||||
<WinBuild BuildNumber="6000" ReleaseDate="2006-11-30T00:00:00Z" DisplayName="Windows Vista / Server 2008 without SP" PlatformId="55041" MayBeServer="true" />
|
||||
<WinBuild BuildNumber="6001" ReleaseDate="2008-02-04T00:00:00Z" DisplayName="Windows Vista / Server 2008 SP1" PlatformId="55041" MayBeServer="true" />
|
||||
<WinBuild BuildNumber="6002" ReleaseDate="2009-05-26T00:00:00Z" DisplayName="Windows Vista / Server 2008 SP2" UseForEpid="true" PlatformId="55041" MayBeServer="true" />
|
||||
<!-- Windows 7 / Server 2008 R2-->
|
||||
<WinBuild BuildNumber="7600" ReleaseDate="2009-10-22T00:00:00Z" DisplayName="Windows 7 / Server 2008 R2 without SP" PlatformId="55041" MayBeServer="true"/>
|
||||
<WinBuild BuildNumber="7601" ReleaseDate="2011-02-22T00:00:00Z" DisplayName="Windows 7 / Server 2008 R2 SP1" PlatformId="55041" UseForEpid="true" MayBeServer="true"/>
|
||||
<WinBuild BuildNumber="7600" ReleaseDate="2009-10-22T00:00:00Z" DisplayName="Windows 7 / Server 2008 R2 without SP" PlatformId="55041" MayBeServer="true" />
|
||||
<WinBuild BuildNumber="7601" ReleaseDate="2011-02-22T00:00:00Z" DisplayName="Windows 7 / Server 2008 R2 SP1" PlatformId="55041" UseForEpid="true" MayBeServer="true" />
|
||||
<!-- Windows 8 / 8.1 / Server 2012 / Server 2012 R2-->
|
||||
<WinBuild BuildNumber="9200" ReleaseDate="2012-10-26T00:00:00Z" DisplayName="Windows 8 / Server 2012" PlatformId="5426" UseForEpid="true" MayBeServer="true" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="9600" ReleaseDate="2013-10-18T00:00:00Z" DisplayName="Windows 8.1 / Server 2012 R2" PlatformId="6401" UseForEpid="true" MayBeServer="true" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="9200" ReleaseDate="2012-10-26T00:00:00Z" DisplayName="Windows 8 / Server 2012" PlatformId="5426" UseForEpid="true" MayBeServer="true" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="9600" ReleaseDate="2013-10-18T00:00:00Z" DisplayName="Windows 8.1 / Server 2012 R2" PlatformId="6401" UseForEpid="true" MayBeServer="true" UsesNDR64="true" />
|
||||
<!-- Windows 10 / Server 2016 / Server 2019 / Server 2022-->
|
||||
<WinBuild BuildNumber="10240" ReleaseDate="2015-07-29T00:00:00Z" DisplayName="Windows 10 1507" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="14393" ReleaseDate="2016-08-02T00:00:00Z" DisplayName="Windows 10 1607 / Server 2016" PlatformId="3612" UseForEpid="true" MayBeServer="true" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="15063" ReleaseDate="2017-04-05T00:00:00Z" DisplayName="Windows 10 1703" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="16299" ReleaseDate="2017-10-17T00:00:00Z" DisplayName="Windows 10 1709" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="17134" ReleaseDate="2018-04-30T00:00:00Z" DisplayName="Windows 10 1803" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="17763" ReleaseDate="2018-10-02T00:00:00Z" DisplayName="Windows 10 1809 / Server 2019" PlatformId="3612" UseForEpid="true" MayBeServer="true" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="18362" ReleaseDate="2019-03-20T00:00:00Z" DisplayName="Windows 10 1903" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="18363" ReleaseDate="2019-11-12T00:00:00Z" DisplayName="Windows 10 1909" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="19041" ReleaseDate="2020-03-22T00:00:00Z" DisplayName="Windows 10 2004" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="19042" ReleaseDate="2020-09-22T00:00:00Z" DisplayName="Windows 10 20H2" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="19043" ReleaseDate="2021-05-18T00:00:00Z" DisplayName="Windows 10 21H1" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="19044" ReleaseDate="2021-09-24T00:00:00Z" DisplayName="Windows 10 21H2" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="20348" ReleaseDate="2021-08-18T00:00:00Z" DisplayName="Windows Server 2022 (21H2)" PlatformId="3612" UseForEpid="true" MayBeServer="true" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="20349" ReleaseDate="2022-07-28T00:00:00Z" DisplayName="Windows Server 2022 (22H2)" PlatformId="3612" MayBeServer="true" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="10240" ReleaseDate="2015-07-29T00:00:00Z" DisplayName="Windows 10 1507" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="14393" ReleaseDate="2016-08-02T00:00:00Z" DisplayName="Windows 10 1607 / Server 2016" PlatformId="3612" UseForEpid="true" MayBeServer="true" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="15063" ReleaseDate="2017-04-05T00:00:00Z" DisplayName="Windows 10 1703" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="16299" ReleaseDate="2017-10-17T00:00:00Z" DisplayName="Windows 10 1709" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="17134" ReleaseDate="2018-04-30T00:00:00Z" DisplayName="Windows 10 1803" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="17763" ReleaseDate="2018-10-02T00:00:00Z" DisplayName="Windows 10 1809 / Server 2019" PlatformId="3612" UseForEpid="true" MayBeServer="true" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="18362" ReleaseDate="2019-03-20T00:00:00Z" DisplayName="Windows 10 1903" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="18363" ReleaseDate="2019-11-12T00:00:00Z" DisplayName="Windows 10 1909" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="19041" ReleaseDate="2020-03-22T00:00:00Z" DisplayName="Windows 10 2004" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="19042" ReleaseDate="2020-09-22T00:00:00Z" DisplayName="Windows 10 20H2" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="19043" ReleaseDate="2021-05-18T00:00:00Z" DisplayName="Windows 10 21H1" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="19044" ReleaseDate="2021-09-24T00:00:00Z" DisplayName="Windows 10 21H2" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="20348" ReleaseDate="2021-08-18T00:00:00Z" DisplayName="Windows Server 2022 (21H2)" PlatformId="3612" UseForEpid="true" MayBeServer="true" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="20349" ReleaseDate="2022-07-28T00:00:00Z" DisplayName="Windows Server 2022 (22H2)" PlatformId="3612" MayBeServer="true" UsesNDR64="true" />
|
||||
<!-- Windows 11 / Server 2025 -->
|
||||
<WinBuild BuildNumber="22000" ReleaseDate="2021-06-24T00:00:00Z" DisplayName="Windows 11 21H2" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="22621" ReleaseDate="2022-05-11T00:00:00Z" DisplayName="Windows 11 22H2" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="22631" ReleaseDate="2023-10-31:00:00:00Z" DisplayName="Windows 11 23H2" PlatformId="3612" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="26100" ReleaseDate="2024-11-01T00:00:00Z" DisplayName="Windows 11 24H2 / Windows Server 2025" PlatformId="3612" UseForEpid="true" MayBeServer="true" UsesNDR64="true"/>
|
||||
<WinBuild BuildNumber="22000" ReleaseDate="2021-06-24T00:00:00Z" DisplayName="Windows 11 21H2" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="22621" ReleaseDate="2022-05-11T00:00:00Z" DisplayName="Windows 11 22H2" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="22631" ReleaseDate="2023-10-31:00:00:00Z" DisplayName="Windows 11 23H2" PlatformId="3612" UsesNDR64="true" />
|
||||
<WinBuild BuildNumber="26100" ReleaseDate="2024-11-01T00:00:00Z" DisplayName="Windows 11 24H2 / Windows Server 2025" PlatformId="3612" UseForEpid="true" MayBeServer="true" UsesNDR64="true" />
|
||||
|
||||
</WinBuilds>
|
||||
|
||||
|
|
@ -574,7 +574,7 @@ You can read them using pkeyconfig-gui off MDL forums or Product Key Config. Rea
|
|||
<SkuItem DisplayName="Windows 7 Professional N" Id="54a09a0d-d57b-4c10-8b69-a842d6590ad5" Gvlk="MRPKT-YTG23-K7D7T-X2JMM-QY7MG" />
|
||||
<SkuItem DisplayName="Windows 7 ThinPC" Id="aa6dd3aa-c2b4-40e2-a544-a6bbb3f5c395" Gvlk="73KQT-CD9G6-K7TQG-66MRP-CQ22C" />
|
||||
<SkuItem DisplayName="Windows 7 Embedded POSReady" Id="db537896-376f-48ae-a492-53d0547773d0" Gvlk="YBYF6-BHCR3-JPKRB-CDW7B-F9BK4" />
|
||||
<SkuItem DisplayName="Windows 7 Embedded Standard" Id="e1a8296a-db37-44d1-8cce-7bc961d59c54" Gvlk="XGY72-BRBBT-FF8MH-2GG8H-W7KCW"/>
|
||||
<SkuItem DisplayName="Windows 7 Embedded Standard" Id="e1a8296a-db37-44d1-8cce-7bc961d59c54" Gvlk="XGY72-BRBBT-FF8MH-2GG8H-W7KCW" />
|
||||
</KmsItem>
|
||||
|
||||
<KmsItem DisplayName="Windows Vista" Id="212a64dc-43b1-4d3d-a30c-2fc69d2095c6" DefaultKmsProtocol="4.0" NCountPolicy="25">
|
||||
|
|
@ -655,7 +655,7 @@ You can read them using pkeyconfig-gui off MDL forums or Product Key Config. Rea
|
|||
<SkuItem DisplayName="Office Access 2016" Id="67c0fc0c-deba-401b-bf8b-9c8ad8395804" Gvlk="GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW" />
|
||||
<SkuItem DisplayName="Office Excel 2016" Id="c3e65d36-141f-4d2f-a303-a842ee756a29" Gvlk="9C2PK-NWTVB-JMPW8-BFT28-7FTBF" />
|
||||
<SkuItem DisplayName="Office Mondo 2016" Id="9caabccb-61b1-4b4b-8bec-d10a3c3ac2ce" Gvlk="HFTND-W9MK4-8B7MJ-B6C4G-XQBR2" />
|
||||
<SkuItem DisplayName="Office Mondo R 2016" Id="e914ea6e-a5fa-4439-a394-a9bb3293ca09" Gvlk="DMTCJ-KNRKX-26982-JYCKT-P7KB6"/>
|
||||
<SkuItem DisplayName="Office Mondo R 2016" Id="e914ea6e-a5fa-4439-a394-a9bb3293ca09" Gvlk="DMTCJ-KNRKX-26982-JYCKT-P7KB6" />
|
||||
<SkuItem DisplayName="Office OneNote 2016" Id="d8cace59-33d2-4ac7-9b1b-9b72339c51c8" Gvlk="DR92N-9HTF2-97XKM-XW2WJ-XW3J6" />
|
||||
<SkuItem DisplayName="Office Outlook 2016" Id="ec9d9265-9d1e-4ed0-838a-cdc20f2551a1" Gvlk="R69KK-NTPKF-7M3Q4-QYBHW-6MT9B" />
|
||||
<SkuItem DisplayName="Office Powerpoint 2016" Id="d70b1bba-b893-4544-96e2-b7a318091c33" Gvlk="J7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6" />
|
||||
|
|
@ -675,7 +675,7 @@ You can read them using pkeyconfig-gui off MDL forums or Product Key Config. Rea
|
|||
</KmsItem>
|
||||
|
||||
<KmsItem DisplayName="Office 2019" Id="617d9eb1-ef36-4f82-86e0-a65ae07b96c6" CanMapToDefaultCsvlk="false" DefaultKmsProtocol="6.0" NCountPolicy="5">
|
||||
<SkuItem DisplayName="Office Access 2019" Id="9e9bceeb-e736-4f26-88de-763f87dcc485" Gvlk="9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT"/>
|
||||
<SkuItem DisplayName="Office Access 2019" Id="9e9bceeb-e736-4f26-88de-763f87dcc485" Gvlk="9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT" />
|
||||
<SkuItem DisplayName="Office Excel 2019" Id="237854e9-79fc-4497-a0c1-a70969691c6b" Gvlk="TMJWT-YYNMB-3BKTF-644FC-RVXBD" />
|
||||
<SkuItem DisplayName="Office Outlook 2019" Id="c8f8a301-19f5-4132-96ce-2de9d4adbd33" Gvlk="7HD7K-N4PVK-BHBCQ-YWQRW-XW4VK" />
|
||||
<SkuItem DisplayName="Office Powerpoint 2019" Id="3131fd61-5e4f-4308-8d6d-62be1987c92c" Gvlk="RRNCX-C64HY-W2MM7-MCH9G-TJHMQ" />
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ def client_update():
|
|||
if sName == name + 'Enterprise' or \
|
||||
sName == name[:6] + 'ProfessionalPlus' + name[6:]:
|
||||
clt_config['KMSClientSkuID'] = skuitem['Id']
|
||||
clt_config['RequiredClientCount'] = int(kmsitem['NCountPolicy'])
|
||||
clt_config['RequiredClientCount'] = int(kmsitem.get('NCountPolicy', 25)) # if not given default to 25
|
||||
clt_config['KMSProtocolMajorVersion'] = int(float(kmsitem['DefaultKmsProtocol']))
|
||||
clt_config['KMSProtocolMinorVersion'] = 0
|
||||
clt_config['KMSClientLicenseStatus'] = 2
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ def epidGenerator(kmsId, version, lcid):
|
|||
for csvlkitem in csvlkitems:
|
||||
try:
|
||||
if kmsId in [ uuid.UUID(kmsitem) for kmsitem in csvlkitem['Activate'] ]:
|
||||
pkeys.append( (csvlkitem['GroupId'], csvlkitem['MinKeyId'], csvlkitem['MaxKeyId'], csvlkitem['InvalidWinBuild']) )
|
||||
pkeys.append( (csvlkitem['GroupId'], csvlkitem['MinKeyId'], csvlkitem['MaxKeyId'], csvlkitem.get('InvalidWinBuild', '[]')) )
|
||||
else:
|
||||
# fallback to Windows Server 2019 parameters.
|
||||
pkeys.append( ('206', '551000000', '570999999', '[0,1,2]') )
|
||||
|
|
@ -40,10 +40,11 @@ def epidGenerator(kmsId, version, lcid):
|
|||
hosts.append(winbuild)
|
||||
except KeyError:
|
||||
# fallback to Windows Server 2019 parameters.
|
||||
hosts.append( {'BuildNumber':'17763', 'PlatformId':'3612', 'MinDate':'02/10/2018'} )
|
||||
hosts.append( {'BuildNumber':'17763', 'PlatformId':'3612', 'ReleaseDate':'2018-10-02T00:00:00Z'} )
|
||||
|
||||
host = random.choice(hosts)
|
||||
BuildNumber, PlatformId, MinDate = host['BuildNumber'], host['PlatformId'], host['MinDate']
|
||||
|
||||
BuildNumber, PlatformId, ReleaseDate = host['BuildNumber'], host['PlatformId'], host['ReleaseDate'].rstrip("Z")
|
||||
|
||||
# Generate Part 3 and Part 4: Product Key ID
|
||||
productKeyID = random.randint(MinKeyId, MaxKeyId)
|
||||
|
|
@ -55,11 +56,11 @@ def epidGenerator(kmsId, version, lcid):
|
|||
languageCode = lcid # (C# CultureInfo.InstalledUICulture.LCID)
|
||||
|
||||
# Generate Part 8: KMS Host Activation Date
|
||||
d = datetime.datetime.strptime(MinDate, "%d/%m/%Y")
|
||||
d = datetime.datetime.fromisoformat(ReleaseDate)
|
||||
minTime = datetime.date(d.year, d.month, d.day)
|
||||
|
||||
# Generate Year and Day Number
|
||||
randomDate = datetime.date.fromtimestamp(random.randint(time.mktime(minTime.timetuple()), time.mktime(datetime.datetime.now().timetuple())))
|
||||
randomDate = datetime.date.fromtimestamp(random.randint(int(time.mktime(minTime.timetuple())), int(time.mktime(datetime.datetime.now().timetuple()))))
|
||||
firstOfYear = datetime.date(randomDate.year, 1, 1)
|
||||
randomDayNumber = int((time.mktime(randomDate.timetuple()) - time.mktime(firstOfYear.timetuple())) / 86400 + 0.5)
|
||||
|
||||
|
|
|
|||
|
|
@ -15,33 +15,34 @@ def _get_serve_count():
|
|||
return _serve_count
|
||||
|
||||
_kms_items = None
|
||||
_kms_items_ignored = None
|
||||
_kms_items_noglvk = None
|
||||
def _get_kms_items_cache():
|
||||
global _kms_items, _kms_items_ignored
|
||||
global _kms_items, _kms_items_noglvk
|
||||
if _kms_items is None:
|
||||
_kms_items = {}
|
||||
_kms_items_ignored = 0
|
||||
queue = [kmsDB2Dict()]
|
||||
while len(queue):
|
||||
item = queue.pop(0)
|
||||
if isinstance(item, list):
|
||||
for i in item:
|
||||
queue.append(i)
|
||||
elif isinstance(item, dict):
|
||||
if 'KmsItems' in item:
|
||||
queue.append(item['KmsItems'])
|
||||
elif 'SkuItems' in item:
|
||||
queue.append(item['SkuItems'])
|
||||
elif 'Gvlk' in item:
|
||||
if len(item['Gvlk']):
|
||||
_kms_items[item['DisplayName']] = item['Gvlk']
|
||||
_kms_items = {} # {group: str -> {product: str -> gvlk: str}}
|
||||
_kms_items_noglvk = 0
|
||||
for section in kmsDB2Dict():
|
||||
for element in section:
|
||||
if "KmsItems" in element:
|
||||
for product in element["KmsItems"]:
|
||||
group_name = product["DisplayName"]
|
||||
items = {}
|
||||
for item in product["SkuItems"]:
|
||||
items[item["DisplayName"]] = item["Gvlk"]
|
||||
if not item["Gvlk"]:
|
||||
_kms_items_noglvk += 1
|
||||
if len(items) == 0:
|
||||
continue
|
||||
if group_name not in _kms_items:
|
||||
_kms_items[group_name] = {}
|
||||
_kms_items[group_name].update(items)
|
||||
elif "DisplayName" in element and "BuildNumber" in element and "PlatformId" in element:
|
||||
pass # these are WinBuilds
|
||||
elif "DisplayName" in element and "Activate" in element:
|
||||
pass # these are CsvlkItems
|
||||
else:
|
||||
_kms_items_ignored += 1
|
||||
#else:
|
||||
# print(item)
|
||||
else:
|
||||
raise NotImplementedError(f'Unknown type: {type(item)}')
|
||||
return _kms_items, _kms_items_ignored
|
||||
raise NotImplementedError(f'Unknown element: {element}')
|
||||
return _kms_items, _kms_items_noglvk
|
||||
|
||||
app = Flask('pykms_webui')
|
||||
app.jinja_env.globals['start_time'] = datetime.datetime.now()
|
||||
|
|
@ -90,7 +91,7 @@ def root():
|
|||
count_clients=countClients,
|
||||
count_clients_windows=countClientsWindows,
|
||||
count_clients_office=countClientsOffice,
|
||||
count_projects=len(_get_kms_items_cache()[0])
|
||||
count_projects=sum([len(entries) for entries in _get_kms_items_cache()[0].values()])
|
||||
), 200 if error is None else 500
|
||||
|
||||
@app.route('/readyz')
|
||||
|
|
@ -125,15 +126,15 @@ def license():
|
|||
@app.route('/products')
|
||||
def products():
|
||||
_increase_serve_count()
|
||||
items, ignored = _get_kms_items_cache()
|
||||
countProducts = len(items)
|
||||
countProductsWindows = len([i for i in items if 'windows' in i.lower()])
|
||||
countProductsOffice = len([i for i in items if 'office' in i.lower()])
|
||||
items, noglvk = _get_kms_items_cache()
|
||||
countProducts = sum([len(entries) for entries in items.values()])
|
||||
countProductsWindows = sum([len(entries) for (name, entries) in items.items() if 'windows' in name.lower()])
|
||||
countProductsOffice = sum([len(entries) for (name, entries) in items.items() if 'office' in name.lower()])
|
||||
return render_template(
|
||||
'products.html',
|
||||
path='/products/',
|
||||
products=items,
|
||||
filtered=ignored,
|
||||
filtered=noglvk,
|
||||
count_products=countProducts,
|
||||
count_products_windows=countProductsWindows,
|
||||
count_products_office=countProductsOffice
|
||||
|
|
|
|||
|
|
@ -32,22 +32,36 @@
|
|||
|
||||
<hr>
|
||||
|
||||
<style scoped>
|
||||
td.glvk {
|
||||
width: 24rem;
|
||||
}
|
||||
|
||||
pre.glvk {
|
||||
width: min-content;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% for group_name, group_products in products | dictsort %}
|
||||
<h1 class="title">{{ group_name }}</h1>
|
||||
<table class="table is-bordered is-striped is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th><abbr title="Group Volume License Key">GVLK</abbr></th>
|
||||
<th class="glvk"><abbr title="Group Volume License Key">GVLK</abbr></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for name, gvlk in products | dictsort %}
|
||||
{% if gvlk %}
|
||||
{% for name, gvlk in group_products | dictsort %}
|
||||
<tr>
|
||||
<td>{{ name }}</td>
|
||||
<td><pre>{{ gvlk }}</pre></td>
|
||||
<td class="glvk">
|
||||
{% if gvlk %}
|
||||
<pre class="glvk">{{ gvlk }}</pre>{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
Loading…
Reference in a new issue