add update-package + audit
This commit is contained in:
21
setup.py
21
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:
|
||||
|
||||
8
update_package.py
Normal file
8
update_package.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from setuphelpers import *
|
||||
from setupdevhelpers import *
|
||||
import waptguihelper
|
||||
|
||||
|
||||
def update_package():
|
||||
|
||||
|
||||
Reference in New Issue
Block a user