templates and data classes are done
This commit is contained in:
@@ -162,6 +162,7 @@ class ScanConfigRepository:
|
||||
report_name=str(rep_raw.get("report_name", "Scan Report")),
|
||||
report_filename=str(rep_raw.get("report_filename", "report.html")),
|
||||
full_details=bool(rep_raw.get("full_details", False)),
|
||||
dark_mode = bool(rep_raw.get("dark_mode", False)),
|
||||
email_to=self._as_str_list(rep_raw.get("email_to", []), "email_to"),
|
||||
email_cc=self._as_str_list(rep_raw.get("email_cc", []), "email_cc"),
|
||||
)
|
||||
@@ -236,7 +237,6 @@ class ScanConfigRepository:
|
||||
raise TypeError(f"'{field_name}' must be a string or a list of strings.")
|
||||
|
||||
# helpers
|
||||
|
||||
def list_configs(self) -> List[str]:
|
||||
"""
|
||||
Return names of loaded configs for UI selection.
|
||||
|
||||
@@ -268,7 +268,7 @@ class nmap_scanner:
|
||||
Run a command and raise on non-zero exit with a readable message.
|
||||
"""
|
||||
try:
|
||||
subprocess.run(cmd, check=True)
|
||||
subprocess.run(cmd, check=True,stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
except subprocess.CalledProcessError as exc:
|
||||
raise RuntimeError(f"Command failed ({exc.returncode}): {' '.join(cmd)}") from exc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user