Skip to content
Snippets Groups Projects
Commit 8b04ed3a authored by Gioacchino Vino's avatar Gioacchino Vino
Browse files

Reviewed scan python code

parent fd5ef9f3
No related branches found
No related tags found
1 merge request!108Updated Python scan code
import json import json
import logging import logging
from typing import Dict
SSH_PORT: str = '22' SSH_PORT: str = '22'
HTTP_PORT: str = '80' HTTP_PORT: str = '80'
HTTPS_PORT: str = '443' HTTPS_PORT: str = '443'
def import_dep_info(file_path: str, endpoint_keys: str) -> dict[str,list[str]]: def import_dep_info(file_path: str, endpoint_keys: str) -> Dict[str,list[str]]:
with open(file_path) as f: with open(file_path) as f:
data = json.load(f) data = json.load(f)
...@@ -42,7 +44,7 @@ def import_dep_info(file_path: str, endpoint_keys: str) -> dict[str,list[str]]: ...@@ -42,7 +44,7 @@ def import_dep_info(file_path: str, endpoint_keys: str) -> dict[str,list[str]]:
endpoints[host] = sorted(list(ports)) endpoints[host] = sorted(list(ports))
return endpoints return endpoints
def process_global_reports_info(reports: dict) -> dict: def process_global_reports_info(reports: Dict) -> Dict:
glob_severity = -1 glob_severity = -1
glob_threat = 'Log' glob_threat = 'Log'
for host in reports: for host in reports:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment