Spaces:
Running
Running
File size: 3,268 Bytes
38f9c15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | import os
import sys
import time
from license_manager import LicenseManager
def clear_screen():
os.system('cls' if os.name == 'nt' else 'clear')
def print_banner():
print("""
βββββββ βββββββ βββββββ ββββββββββββββββ βββ βββββββ
βββββββββββββββββββββββββββββββββββββββββββ βββββββββββ
βββββββββββ ββββββ βββ βββ βββββββββ ββββββ ββββ
βββββββββββ ββββββ βββ βββ ββββββββββββββββ βββ
βββ βββββββββββββββββββββ βββ ββββββ βββββββββββββββ
βββ βββ βββββββ βββββββ βββ ββββββ βββββ βββββββ
FUTURE STRATEGY ENGINE - COMMERCIAL LICENSE GENERATOR
=====================================================
")
def main():
clear_screen()
print_banner()
lm = LicenseManager()
print(" BENVENUTO NEL GENERATORE DI LICENZE")
print(" Questo tool genera chiavi di sblocco per i clienti paganti.")
print("\n ISTRUZIONI:")
print(" 1. Copia il 'Codice Macchina' fornito dal cliente (es. 9B3A-1C2D-...")
print(" 2. Inserisci l'email del cliente (usata per l'acquisto)")
print(" 3. Invia la chiave generata al cliente")
print(" =" * 30)
while True:
print("\n--- NUOVA LICENZA ---")
email = input("\n[1] Email Cliente: ").strip()
if not email:
print("(!) L'email Γ¨ obbligatoria.")
continue
machine_code = input("[2] Codice Macchina Cliente: ").strip()
if not machine_code:
print("(!) Il codice macchina Γ¨ obbligatorio.")
continue
try:
print("\nGenerazione in corso...", end="")
time.sleep(0.5) # Simula calcolo per UX
license_key = lm.generate_license_key(email, machine_code)
print("\n" + " " * 40)
print(" " + "β" + "β" * 42 + "β")
print(f" β CHIAVE: \033[1;32m{license_key}\033[0m β")
print(" " + "β" + " " * 42 + "β")
print(" " + "β" + "β" * 42 + "β")
print("\n [OK] Licenza generata e valida per questo HWID.")
except Exception as e:
print(f"\n[ERROR] Errore imprevisto: {e}")
choice = input("\nGenerare un'altra licenza? (Invio per SI, 'q' per uscire): ").lower()
if choice == 'q':
print("\nChiusura KeyGen...")
time.sleep(1)
break
clear_screen()
print_banner()
if __name__ == "__main__":
# Abilita colori ANSI su Windows 10+
os.system("")
try:
main()
except KeyboardInterrupt:
print("\n\nOperazione annullata dall'utente.")
sys.exit(0)
|