Skip to content

Commit

Permalink
Merge pull request #63 from alexander-hanel/master
Browse files Browse the repository at this point in the history
Config Hash Option
  • Loading branch information
danielplohmann authored Feb 24, 2025
2 parents 9026f0e + 7167c34 commit 601b0c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions smda/SmdaConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ class SmdaConfig(object):
# optional metadata generation options
CALCULATE_SCC = True
CALCULATE_NESTING = True
CALCULATE_HASHING = True
# confidence score to use for filtering functions before including them in the output
CONFIDENCE_THRESHOLD = 0.0
3 changes: 2 additions & 1 deletion smda/common/SmdaFunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def __init__(self, disassembly=None, function_offset=None, config=None, smda_rep
self.characteristics = disassembly.candidates[function_offset].getCharacteristics() if function_offset in disassembly.candidates else None
self.confidence = disassembly.candidates[function_offset].getConfidence() if function_offset in disassembly.candidates else None
self.tfidf = disassembly.candidates[function_offset].getTfIdf() if function_offset in disassembly.candidates else None
self.pic_hash = self.getPicHash(disassembly.binary_info)
if config and config.CALCULATE_HASHING:
self.pic_hash = self.getPicHash(disassembly.binary_info)
if config and config.CALCULATE_SCC:
self.strongly_connected_components = self._calculateSccs()
if config and config.CALCULATE_NESTING:
Expand Down

0 comments on commit 601b0c8

Please sign in to comment.