Created
January 30, 2019 15:20
-
-
Save lj1nu/4b7bff1f147801d4e1811c9c84d431cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_basic_block(addr): | |
res = None | |
_func = idaapi.get_func(addr) | |
for block in idaapi.FlowChart(_func): | |
if block.startEA >= addr: | |
return hex(res)[:-1] | |
else: | |
res = block.startEA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment