From 12dcc698ab283166375e84f5108407a07d84ccad Mon Sep 17 00:00:00 2001 From: Raspberry Pi User Date: Thu, 19 Mar 2026 16:26:05 +0530 Subject: [PATCH 1/2] Use local database directory from config instead of fixed sploitscan directory. This PR enables sploitscan to use already checkout cvelistV5 directory via a configuration key "local_database_dir". So sploitscan can use that as source and not the always fixed directory. --- sploitscan/cli.py | 4 ++-- sploitscan/search.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sploitscan/cli.py b/sploitscan/cli.py index bd7f9e0..476627b 100644 --- a/sploitscan/cli.py +++ b/sploitscan/cli.py @@ -151,7 +151,7 @@ def main( Orchestrate SploitScan workflow for one or more CVE IDs. """ config = load_config(config_path=config_path, debug=debug) - + print(config) all_results: List[Dict[str, Any]] = [] selected = _selected(methods) @@ -375,7 +375,7 @@ def cli() -> None: clone_cvelistV5_repo(config=cfg) if args.keywords: - cve_ids = search_cve_by_keywords(args.keywords) + cve_ids = search_cve_by_keywords(args.keywords, cfg) if not cve_ids: raise SystemExit("No valid CVE IDs found for the provided keywords.") else: diff --git a/sploitscan/search.py b/sploitscan/search.py index 77b8285..107b9c5 100644 --- a/sploitscan/search.py +++ b/sploitscan/search.py @@ -9,7 +9,7 @@ from .constants import NUCLEI_URL -def search_cve_by_keywords(keywords: Iterable[str]) -> List[str]: +def search_cve_by_keywords(keywords: Iterable[str], cfg: Dict[str, Any]) -> List[str]: """ Aggregate CVE IDs matching all keywords across: - Local cvelistV5 JSON database (if present) @@ -22,7 +22,7 @@ def search_cve_by_keywords(keywords: Iterable[str]) -> List[str]: results: Set[str] = set() # Local grep - local_cve_ids = grep_local_db(kws) + local_cve_ids = grep_local_db(kws, config=cfg) if local_cve_ids: results.update(local_cve_ids) From b729d63dd22696c2b312956a16331480e240b90e Mon Sep 17 00:00:00 2001 From: Raspberry Pi User Date: Thu, 19 Mar 2026 16:31:03 +0530 Subject: [PATCH 2/2] Removed logging. --- sploitscan/cli.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sploitscan/cli.py b/sploitscan/cli.py index 476627b..71992d4 100644 --- a/sploitscan/cli.py +++ b/sploitscan/cli.py @@ -151,7 +151,6 @@ def main( Orchestrate SploitScan workflow for one or more CVE IDs. """ config = load_config(config_path=config_path, debug=debug) - print(config) all_results: List[Dict[str, Any]] = [] selected = _selected(methods)