Created
May 9, 2019 17:29
-
-
Save alexander-hanel/16fe450021ab44e5d8ba07cbae6c30d4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import idautils | |
comments = {} | |
for func in idautils.Functions(): | |
flags = idc.get_func_attr(func, FUNCATTR_FLAGS) # skip library & thunk functions | |
if flags & FUNC_LIB or flags & FUNC_THUNK: | |
continue | |
dism_addr = list(idautils.FuncItems(func)) | |
for ea in dism_addr: | |
temp = idc.get_cmt(ea, 0) | |
if temp: | |
comments[ea] = temp | |
temp = idc.get_cmt(ea, 1) | |
if temp: | |
comments[ea] = temp | |
print comments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment