From 2bbfccdfc155f3b0c47f6ae6a71e85752f17b54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20J=2E=20Rodr=C3=ADguez?= Date: Sat, 28 Sep 2024 20:32:23 +0200 Subject: [PATCH] minor typos and fixes --- apotheosis.py | 2 +- rest.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apotheosis.py b/apotheosis.py index 90e8fd0..54ed56d 100644 --- a/apotheosis.py +++ b/apotheosis.py @@ -500,7 +500,7 @@ def search_exact_match_only(self, hash_value): """ found, node = self._radix.search(hash_value) - logger.info("Trying exact match for \"{hash_value}\" ... found? {found}") + logger.info(f"Trying exact match for \"{hash_value}\" ... found? {found}") return found, node def knn_search(self, query=None, k:int=0, ef=0, hashid=0): diff --git a/rest.py b/rest.py index daeef78..4693dd0 100644 --- a/rest.py +++ b/rest.py @@ -322,11 +322,11 @@ def load_apotheosis(apo_model_tlsh: str=None, apo_model_ssdeep: str=None, heuristic=False,\ extend_candidates=False, keep_pruned_conns=False,\ beer_factor=0,\ - distance_algorithm=SSDEEPHashAlgorithm) + distance_algorithm=TLSHHashAlgorithm) # load from DB and insert into the model print("[*] Building Apotheosis with TLSH ...") - utils.load_DB_in_model(npages=args.npages, algorithm=SSDEEPHashAlgorithm, current_model=apotheosis_tlsh) + utils.load_DB_in_model(npages=args.npages, algorithm=TLSHHashAlgorithm, current_model=apotheosis_tlsh) apotheosis_ssdeep = apotheosis_tlsh @@ -337,7 +337,7 @@ def load_apotheosis(apo_model_tlsh: str=None, apo_model_ssdeep: str=None, parser = argparse.ArgumentParser() parser.add_argument('-algorithm', '--distance-algorithm', choices=["tlsh", "ssdeep"], default='tlsh', help="Distance algorithm to be used in the underlying HNSW structure (default=tlsh)") parser.add_argument("--port", type=int, default=5000, help="Port to serve (default 5000)") - parser.add_argument('-f', '--file', type=str, help='Load previusly saved APOTHEOSIS model from file') + parser.add_argument('-f', '--file', type=str, help='Load previously saved APOTHEOSIS model from file') parser.add_argument('--npages', type=int, default=None, help="Number of pages to test (default=None -- means all)") parser.add_argument('--debug-mode', action='store_true', help="Run REST API in dev mode") parser.add_argument('-log', '--loglevel', choices=["debug", "info", "warning", "error", "critical"], default='info', help="Provide logging level (default=warning)")