mirror of
https://github.com/Jamesits/pve-fake-subscription
synced 2024-08-30 16:52:18 +00:00
fix auxiliary files
This commit is contained in:
parent
52888f4557
commit
170ea8fb0e
@ -2,12 +2,14 @@ I am really poor and I really can't afford a license. I just want to get rid of
|
||||
|
||||
## Features
|
||||
|
||||
* Works for any version >=5 (we've tested this from 5.3 to 6.0 without any changes in the code)
|
||||
* Supports Proxmox VE and Proxmox Mail Gateway
|
||||
* Works for:
|
||||
- Proxmox VE (5.x or later, tested up to 7.0)
|
||||
- Proxmox Mail Gateway (5.x or later)
|
||||
- Proxmox Backup Server (1.x)
|
||||
* Non-intrusive, no changes to any system file, persists between system updates
|
||||
* Comes with standard Debian package, easy to manage and automate
|
||||
* You can uninstall at any time, hassle-free
|
||||
* **No JavaScript**
|
||||
* **No JavaScript is involved** in the whole process
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
rm -f /etc/subscription
|
||||
rm -f /etc/pmg/subscription
|
||||
rm -f /etc/pmg/subscription
|
||||
rm -f /etc/proxmox-backup/subscription
|
@ -13,14 +13,14 @@ from typing import List
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
# PVE & PMG: /usr/share/perl5/PVE/Subscription.pm
|
||||
# PBS: /usr/lib/x86_64-linux-gnu/proxmox-backup/*
|
||||
# PBS: /usr/lib/x86_64-linux-gnu/proxmox-backup/* (source code at `https://git.proxmox.com/git/proxmox-backup.git`)
|
||||
shared_key_data = "kjfdlskfhiuewhfk947368"
|
||||
server_key_file = "/etc/ssh/ssh_host_rsa_key.pub"
|
||||
|
||||
def get_timestamp() -> int:
|
||||
return int(time.time())
|
||||
|
||||
# Perl's md5_base64_perl implementation
|
||||
# Perl's md5_base64 implementation
|
||||
def md5_base64_perl(x: str) -> str:
|
||||
return base64.b64encode(hashlib.md5(x.encode()).digest()).strip(b'=').decode()
|
||||
|
||||
@ -89,7 +89,7 @@ def generate_subscription_pbs(key: str, server_ids: List[str]) -> str:
|
||||
|
||||
return key + "\n" + csum + "\n" + data + "\n"
|
||||
|
||||
# key_pattern can be find in src/tools/subscription.rs
|
||||
# Key pattern: pbst-xxxxxxxxxx
|
||||
def activate_pbs(key: str, subscription_file: str) -> None:
|
||||
# get machine ID
|
||||
server_id = ""
|
||||
|
Loading…
Reference in New Issue
Block a user