Helps debugging encrypted variables issues
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
871 B

  1. # -*- coding: UTF-8 -*-
  2. from setuphelpers import *
  3. uninstallkey = []
  4. variables = {}
  5. # Read local variables file if available
  6. if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')):
  7. print('Reading local encrypted variables file')
  8. from cryptography.fernet import Fernet
  9. import yaml
  10. key = open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read()
  11. print('Key is %s', % key)
  12. f = Fernet(key)
  13. print('Fernet object created')
  14. crypted_var = open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read()
  15. print('Encrypted vars found : %s' % crypted_var)
  16. decrypted_var = f.decrypt(crypted_var)
  17. print('Decrypted vars %s' % decrypted_var
  18. def install():
  19. print('Nothing to do')
  20. def uninstall():
  21. print('Nothing to do')