Skip to content

Commit

Permalink
commands: make find-str receive str
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Sep 15, 2024
1 parent 9bf9ed0 commit 45bd9f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fa/commands/find_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def get_parser():
return p


def find_str(string, null_terminated=False):
hex_str = binascii.hexlify(string)
def find_str(string: str, null_terminated: bool = False):
hex_str = str(binascii.hexlify(bytearray(string.encode())).decode())
if null_terminated:
hex_str += '00'
return find_bytes.find_bytes(hex_str)
Expand Down

0 comments on commit 45bd9f4

Please sign in to comment.