Skip to content

Commit

Permalink
Update capa/features/extractors/ghidra/insn.py
Browse files Browse the repository at this point in the history
Co-authored-by: Moritz <[email protected]>
  • Loading branch information
mike-hunhoff and mr-tz authored Nov 29, 2023
1 parent 3c348c6 commit 84a6251
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions capa/features/extractors/ghidra/insn.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def extract_insn_offset_features(fh: FunctionHandle, bb: BBHandle, ih: InsnHandl
# ignore stack references
return

# Ghidra stores operands in 2D arrays if they contain offsets
for i in range(insn.getNumOperands()):
if insn.getOperandType(i) == OperandType.DYNAMIC: # e.g. [esi + 4]
# manual extraction, since the default api calls only work on the 1st dimension of the array
Expand Down

0 comments on commit 84a6251

Please sign in to comment.