|
|
@ -1,7 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
from setuphelpers import * |
|
|
|
from setuphelpers import * |
|
|
|
from cryptography.fernet import Fernet |
|
|
|
import os, random, string, time |
|
|
|
import json, os, random, string, time |
|
|
|
|
|
|
|
from jinja2 import Environment, FileSystemLoader |
|
|
|
from jinja2 import Environment, FileSystemLoader |
|
|
|
|
|
|
|
|
|
|
|
uninstallkey = [] |
|
|
|
uninstallkey = [] |
|
|
@ -15,8 +14,10 @@ variables = { |
|
|
|
# Read local variables file if available |
|
|
|
# Read local variables file if available |
|
|
|
if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')): |
|
|
|
if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')): |
|
|
|
print('Reading local encrypted variables file') |
|
|
|
print('Reading local encrypted variables file') |
|
|
|
|
|
|
|
from cryptography.fernet import Fernet |
|
|
|
|
|
|
|
import yaml |
|
|
|
f = Fernet(open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read()) |
|
|
|
f = Fernet(open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read()) |
|
|
|
variables.update(json.loads(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read()))) |
|
|
|
variables.update(yaml.safe_load(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read()))) |
|
|
|
|
|
|
|
|
|
|
|
# Create a random pass for the local backup account if not defined |
|
|
|
# Create a random pass for the local backup account if not defined |
|
|
|
if not 'backup_pass' in variables: |
|
|
|
if not 'backup_pass' in variables: |
|
|
|