Skip to content

Commit

Permalink
Merge pull request #55 from doronz88/bugfix/make-find-str-receive-str
Browse files Browse the repository at this point in the history
commands: make `find-str` receive `str`
  • Loading branch information
doronz88 authored Sep 15, 2024
2 parents 9bf9ed0 + 45bd9f4 commit 487f0a2
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 487f0a2

Please sign in to comment.