mirror of
https://github.com/ThomasGsp/HyperProxmox.git
synced 2025-03-09 15:40:18 +00:00
Crypto decode user and password
This commit is contained in:
parent
67dfa9a5c2
commit
e4b14f520d
1 changed files with 5 additions and 8 deletions
|
@ -14,7 +14,6 @@ from core.libs.hcrypt import *
|
||||||
import time
|
import time
|
||||||
import operator
|
import operator
|
||||||
import random
|
import random
|
||||||
import bson
|
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
def add_token(tokens_in_slots, slot_distributions):
|
def add_token(tokens_in_slots, slot_distributions):
|
||||||
|
@ -58,17 +57,15 @@ class Analyse:
|
||||||
for cluster in self.clusters_conf:
|
for cluster in self.clusters_conf:
|
||||||
""" Decode data """
|
""" Decode data """
|
||||||
|
|
||||||
user = pdecrypt(base64.b64decode(cluster["user"]), self.generalconf["keys"]["key_pvt"])["data"].decode('utf-8')
|
user = pdecrypt(base64.b64decode(cluster["user"]),
|
||||||
password = pdecrypt(base64.b64decode(cluster["password"]), self.generalconf["keys"]["key_pvt"])["data"].decode('utf-8')
|
self.generalconf["keys"]["key_pvt"])["data"].decode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
|
password = pdecrypt(base64.b64decode(cluster["password"]),
|
||||||
|
self.generalconf["keys"]["key_pvt"])["data"].decode('utf-8')
|
||||||
|
|
||||||
""" AUTH """
|
""" AUTH """
|
||||||
proxmox = Proxmox("Analyse")
|
proxmox = Proxmox("Analyse")
|
||||||
proxmox.get_ticket("{0}:{1}".format(cluster["url"],
|
proxmox.get_ticket("{0}:{1}".format(cluster["url"], int(cluster["port"])), user, password)
|
||||||
int(cluster["port"])),
|
|
||||||
pdecrypt(user, self.generalconf["keys"]["key_pvt"]),
|
|
||||||
pdecrypt(password, self.generalconf["keys"]["key_pvt"]))
|
|
||||||
|
|
||||||
""" Get excluded nodes """
|
""" Get excluded nodes """
|
||||||
exclude_nodes = cluster["exclude_nodes"]
|
exclude_nodes = cluster["exclude_nodes"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue