mirror of
https://github.com/Jamesits/pve-fake-subscription
synced 2026-09-26 14:40:19 -04:00
support PVE9.2 arm64 (#20)
This commit is contained in:
parent
31cd2b8746
commit
c7823ee37e
@ -1,7 +1,7 @@
|
|||||||
name: "pve-fake-subscription"
|
name: "pve-fake-subscription"
|
||||||
arch: "all"
|
arch: "all"
|
||||||
platform: "linux"
|
platform: "linux"
|
||||||
version: "0.0.11"
|
version: "0.0.12"
|
||||||
version_schema: "semver"
|
version_schema: "semver"
|
||||||
version_metadata: "git"
|
version_metadata: "git"
|
||||||
|
|
||||||
|
|||||||
@ -5,12 +5,13 @@
|
|||||||
# If you need to prevent it checking keys against a server, please block "shop.maurer-it.com" in your hosts file
|
# If you need to prevent it checking keys against a server, please block "shop.maurer-it.com" in your hosts file
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import hashlib
|
|
||||||
import base64
|
import base64
|
||||||
|
import hashlib
|
||||||
import json
|
import json
|
||||||
|
import platform
|
||||||
import time
|
import time
|
||||||
import re
|
# import re
|
||||||
import sys
|
# import sys
|
||||||
import os
|
import os
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
@ -20,7 +21,10 @@ shared_key_data = "kjfdlskfhiuewhfk947368"
|
|||||||
server_key_file = "/etc/ssh/ssh_host_rsa_key.pub"
|
server_key_file = "/etc/ssh/ssh_host_rsa_key.pub"
|
||||||
|
|
||||||
# Default license keys
|
# Default license keys
|
||||||
lic_pve = "pve8p-1145141919"
|
# https://github.com/proxmox/pve-manager/blob/c3a8ade7aceaafa4e73c4b0c4d93a1ee66db7913/PVE/API2/Subscription.pm#L46
|
||||||
|
lic_pve = {
|
||||||
|
"aarch64": "pve8p-arm-1145141919",
|
||||||
|
}.get(platform.machine(), "pve8p-1145141919")
|
||||||
lic_pmg = "pmgp-1145141919"
|
lic_pmg = "pmgp-1145141919"
|
||||||
lic_pbs = "pbst-1145141919"
|
lic_pbs = "pbst-1145141919"
|
||||||
|
|
||||||
@ -64,8 +68,9 @@ def generate_subscription_pve_pmg(key, server_ids, product_name=ui_product_name)
|
|||||||
return key + "\n" + csum + "\n" + data + "\n"
|
return key + "\n" + csum + "\n" + data + "\n"
|
||||||
|
|
||||||
# key_pattern can be find in /usr/share/perl5/{PVE,PMG}/API2/Subscription.pm
|
# key_pattern can be find in /usr/share/perl5/{PVE,PMG}/API2/Subscription.pm
|
||||||
# PVE5+: r'pve([1248])([cbsp])-[0-9a-f]{10}'
|
# PVE9+: r'pve([1248])([cbsp])-(arm-)?[0-9a-f]{10}'
|
||||||
# PVE3/4: r'pve([124])([cbsp])-[0-9a-f]{10}'
|
# PVE5-8: r'pve([1248])([cbsp])-[0-9a-f]{10}'
|
||||||
|
# PVE3-4: r'pve([124])([cbsp])-[0-9a-f]{10}'
|
||||||
# PMG: r'pmg([cbsp])-[0-9a-f]{10}'
|
# PMG: r'pmg([cbsp])-[0-9a-f]{10}'
|
||||||
def activate_pve_pmg(key, subscription_file, *args, **kwargs):
|
def activate_pve_pmg(key, subscription_file, *args, **kwargs):
|
||||||
# check if the key format is correct
|
# check if the key format is correct
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user