From 1223914041b47f8ea2f389578150fe3891b5c8a7 Mon Sep 17 00:00:00 2001 From: Gabriel Gendron Date: Mon, 22 Jul 2024 16:36:16 +0200 Subject: [PATCH] add update-package + audit --- setup.py | 21 ++++++++++----------- update_package.py | 8 ++++++++ 2 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 update_package.py diff --git a/setup.py b/setup.py index 1d0d552..3d4f5ed 100644 --- a/setup.py +++ b/setup.py @@ -53,6 +53,16 @@ def install(): if configure_network_settings is True : configure_network_settings() +def audit(): + successful_checks = 0 + failed_checks = 0 + verify_settings() + nb_checks = successful_checks + failed_checks + ratio = nb_checks / failed_checks + print(f"\nNombre de vérifications réussies : {successful_checks}") + print(f"Nombre de vérifications échouées : {failed_checks}") + print(f"Pourcentage de checks mauvais = {ratio}") + def rename_and_disable_user(old_name, new_name): try: run(f'wmic useraccount where name="{old_name}" rename {new_name}', check=True) @@ -189,17 +199,6 @@ def configure_network_settings(): registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters', 'EnableICMPRedirects', 0) registry_set(HKEY_LOCAL_MACHINE,r'SYSTEM\CurrentControlSet\Services\Tcpip\Parameters', 'EnableMulticastForwarding', 0) -def audit(): - successful_checks = 0 - failed_checks = 0 - verify_settings() - nb_checks = successful_checks + failed_checks - ratio = nb_checks / failed_checks - print(f"\nNombre de vérifications réussies : {successful_checks}") - print(f"Nombre de vérifications échouées : {failed_checks}") - print(f"Pourcentage de checks mauvais = {ratio}") - - def registry_readstring(hive, path, name): try: with reg.OpenKey(hive, path) as key: diff --git a/update_package.py b/update_package.py new file mode 100644 index 0000000..b632df3 --- /dev/null +++ b/update_package.py @@ -0,0 +1,8 @@ +from setuphelpers import * +from setupdevhelpers import * +import waptguihelper + + +def update_package(): + + \ No newline at end of file