Add function for audit

This commit is contained in:
Heuze Florent 2021-02-09 15:04:13 +01:00
parent 2daf9320b8
commit 385177c61e
1 changed files with 9 additions and 4 deletions

View File

@ -27,6 +27,7 @@ import subprocess
uninstallkey = []
def on_dist_backup(operation,src,dst):
# When we backup the distribution dir, we have to exclude
# lightning as a new version will be installed, bundled with TB itself.
@ -151,7 +152,11 @@ def uninstall():
def audit():
for reg in ['DisableAppUpdate','DisableTelemetry']:
if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Mozilla\Thunderbird\DisableAppUpdate'):
print(r'Key HKLM\SOFTWARE\Policies\Mozilla\Thunderbird\%s exists' % reg)
else:
print('ERROR : Keys is missing for disable update !')
if not registry_readstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\Policies\Mozilla\Thunderbird\%s' % reg):
print(r'Warning : SOFTWARE\Policies\Mozilla\Thunderbird\%s is missing !' % reg)
return "WARNING"
value = registry_readstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\Policies\Mozilla\Thunderbird\%s' % reg)
if value != "1" :
print("Warning : Thunderbird update is not disable !")
return "WARNING"