Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor typos and fixes #2

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apotheosis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)")
Expand Down