Skip to content

Commit

Permalink
Merge pull request #2 from reverseame/plagiarism
Browse files Browse the repository at this point in the history
minor typos and fixes
  • Loading branch information
ricardojrdez authored Sep 28, 2024
2 parents cc82d29 + 2bbfccd commit 03e38a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 03e38a2

Please sign in to comment.