Skip to content

Commit

Permalink
Update cutter_api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hyuunnn committed Aug 23, 2022
1 parent db11475 commit 6b0c8d6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions hyara_lib/integration/cutter_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ def get_hex(self, start_address, end_address) -> str:

def get_comment_hex(self, start_address, end_address) -> list:
result = []
current_start = start_address
while current_start < end_address:
cutter_data = cutter.cmdj(f"i. @ {current_start}")
result.append(self.get_hex(current_start, cutter_data["next"]))
current_start = cutter_data["next"]
data = cutter.cmdj("pdj")
for i in data:
if i["offset"] >= start_address and i["offset"] < end_address:
result.append(i["bytes"])
return result

def get_string(self, start_address, end_address) -> list:
Expand Down

0 comments on commit 6b0c8d6

Please sign in to comment.