check_sys/main.py
2023-06-04 21:26:27 +02:00

37 lines
816 B
Python

#!/usr/bin/env python
from argparse import ArgumentParser
from sysctl import Sysctl
def checkArguments():
args = ArgumentParser(description="Check Gitlab repositories")
args.add_argument('-a', '--audit', help="Kind of audit", choices=['system', 'application'])
return args.parse_args()
def main():
args = checkArguments()
# If audit is not specified
if args.audit is None:
print("Please, you must specify the audit type")
exit(1)
# Report
report = dict()
report['system'] = None
# Audit application
if args.audit == "application":
pass
# Audit system
if args.audit == "system":
sysctl = Sysctl()
sysctl.runAudit()
report['sysctl'] = sysctl.getReports()
if __name__ == "__main__":
main()