From e789bb2388b9d99a061d2cea43b29402d9bbdc6a Mon Sep 17 00:00:00 2001 From: ugomeguerditchian Date: Thu, 29 Jun 2023 15:47:01 +0200 Subject: [PATCH] debug nuclei result parser --- configuration.yaml | 2 +- main.py | 1 - manifest | 2 +- tools/analyze_web_techno.py | 1 - tools/nuclei.py | 6 ++++++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configuration.yaml b/configuration.yaml index 3ca297b..dba08e3 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -81,7 +81,7 @@ TOOLS : workers: 2000 nuclei: file: "nuclei" - headless_browser: True + headless_browser: false activate: true conf_file: null diff --git a/main.py b/main.py index 3a9b6eb..cf2e127 100644 --- a/main.py +++ b/main.py @@ -12,7 +12,6 @@ from tools import orc import argparse -from concurrent.futures import ThreadPoolExecutor logger = cl.logger diff --git a/manifest b/manifest index 69f5d36..363d145 100644 --- a/manifest +++ b/manifest @@ -1 +1 @@ -V3.0.2 \ No newline at end of file +V3.0.3 \ No newline at end of file diff --git a/tools/analyze_web_techno.py b/tools/analyze_web_techno.py index 5d703e5..4f629ea 100644 --- a/tools/analyze_web_techno.py +++ b/tools/analyze_web_techno.py @@ -5,7 +5,6 @@ import lib.handler as handler import lib.generics as gen import lib.custom_logger as custom_logger -import json logger = custom_logger.logger diff --git a/tools/nuclei.py b/tools/nuclei.py index 169bf48..daed6c4 100644 --- a/tools/nuclei.py +++ b/tools/nuclei.py @@ -162,8 +162,11 @@ def main(config: gen.configuration, res: result) -> dict: for ip in res.result: res.result[ip]["vulns"] = [] for result_ in nuclei_results: + if result_["host"][-1] == ".": + result_["host"] = result_["host"][:-1] if ( result_["host"] == str(ip.ip) + or result_["matched-at"] == str(ip.ip) or result_["host"] == "https://" + str(ip.ip) or result_["host"] == "http://" + str(ip.ip) and result_ not in res.result[ip]["vulns"] @@ -175,8 +178,11 @@ def main(config: gen.configuration, res: result) -> dict: for fqdn in res.result[ip]["fqdns"]: res.result[ip]["fqdns"][fqdn]["vulns"] = [] for result_ in nuclei_results: + if result_["host"][-1] == ".": + result_["host"] = result_["host"][:-1] if ( result_["host"] == fqdn + or result_["matched-at"] == fqdn or result_["host"] == "https://" + fqdn or result_["host"] == "http://" + fqdn and result_ not in res.result[ip]["fqdns"][fqdn]["vulns"]