Update project

This commit is contained in:
gbucchino
2023-09-18 14:51:01 +02:00
parent c21cdf3c57
commit 274b361a63
4 changed files with 8 additions and 561 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ def getAllPlugins(audit):
elif audit == "application":
pass
def main():
def main(path):
args = checkArguments()
if args.plugins is not None:
@@ -76,7 +76,7 @@ def main():
pass
print("End of the audit. Generating the report")
generateHtmlReport(report)
generateHtmlReport(path, report)
@Dispatcher.register_plugins
def sysctl(*args) -> dict:
+3 -3
View File
@@ -4,8 +4,8 @@ from datetime import datetime
import jinja2
def generateHtmlReport(data):
today = datetime.now().isoformat()[0:10].replace("-", "_")
def generateHtmlReport(path, data):
today = datetime.now().isoformat()[0:10]
dataJinja2 = dict()
dataJinja2['title'] = 'Report check system'
dataJinja2['plugins'] = list()
@@ -80,7 +80,7 @@ def generateHtmlReport(data):
rdr = tmplIndex.render(data=dataJinja2)
hostname = data['hostname'].lower()
with open(f"reports/reports_{hostname}_{today}.html", "w") as f:
with open(f"{path}/reports/reports_{hostname}_{today}.html", "w") as f:
f.write(rdr)
print("The report is generated at this location: " \