New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed get_ins_exclude_lib not handling multiple shared objects properly #1317
Conversation
…you want to filter history from multiple shared objects
…multiple shared objects properly
… history functions to return capstone objects because they are nicer to look at than just integers (addresses)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, and especially for taking the time to annotate and document everything. I added a few more comments.
@@ -122,13 +132,13 @@ def get_mem_map_from_addr(self, ins: int) -> tuple: | |||
# i sure hope theres not more than one map that contains the instruction lol | |||
return mem_map[0] | |||
|
|||
def get_regex_matching_exec_maps(self, libs: List) -> List: | |||
def get_regex_matching_exec_maps(self, libs: List[str]) -> List: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like libs
should be of type Union[str, Collection[str]]
as it accepts both options.
… types, __hook_block is a class method now because it makes sense,
…or dealing with arm arch, and not accessing the ql.arch.disassember directly anymore
Checklist
Which kind of PR do you create?
Coding convention?
Extra tests?
Changelog?
Target branch?
One last thing
the current implementation doesnt handle the case where you want to exclude multiple shared objects. also added test cases to catch this bug