Skip to content

Commit

Permalink
Merge pull request #94 from iamtimmy/master
Browse files Browse the repository at this point in the history
Fixed sark.core.iter* in IDA 7.5
  • Loading branch information
tmr232 committed Feb 14, 2021
2 parents 37045b4 + f8f4fae commit 1d8c78e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Expand Up @@ -9,6 +9,7 @@ Contributors
The following people have contributed directly or indirectly to this project:

- `darx0r <https://github.com/darx0r>`_
- `iamtimmy <https://github.com/iamtimmy>`_
- `ynvb <https://github.com/ynvb>`_
- `OfficialMan <https://github.com/OfficialMan>`_

Expand Down
9 changes: 5 additions & 4 deletions sark/core.py
@@ -1,5 +1,6 @@
import idaapi
import idc
import ida_search
import string
from . import exceptions

Expand Down Expand Up @@ -68,14 +69,14 @@ def iter_find_query(query, start=None, end=None, down=True):
start, end = fix_addresses(start, end)

if down:
direction = idc.SEARCH_DOWN
direction = ida_search.SEARCH_DOWN
else:
direction = idc.SEARCH_UP
direction = ida_search.SEARCH_UP

current = idc.FindBinary(start, direction, query)
current = ida_search.find_binary(start, end, query, 16, direction)
while current < end:
yield current
current = idc.FindBinary(current + 1, direction, query)
current = ida_search.find_binary(current + 1, end, query, 16, direction)


def fix_addresses(start=None, end=None):
Expand Down

0 comments on commit 1d8c78e

Please sign in to comment.