Skip to content

Commit

Permalink
adding options for choosing b/w bookmarks & comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Atlas-64 committed Mar 14, 2024
1 parent 0eb4291 commit fe2a208
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions capa/ghidra/capa_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,23 @@ def main():
popup("capa explorer found no matches.") # type: ignore [name-defined] # noqa: F821
return capa.main.E_EMPTY_REPORT

for item in parse_json(capa_data):
item.bookmark_functions()
item.label_matches()
user_choice = askChoice( # type: ignore [name-defined] # noqa: F821
"Choose b/w bookmarks & comments", "preferred action:", ["bookmarks", "comments", "both", "none"], "both")


if user_choice == "bookmarks":
for item in parse_json(capa_data):
item.bookmark_functions()
elif user_choice == "comments":
for item in parse_json(capa_data):
item.label_matches()
elif user_choice == "both":
for item in parse_json(capa_data):
item.bookmark_functions()
item.label_matches()
else:
pass

logger.info("capa explorer analysis complete")
popup("capa explorer analysis complete.\nPlease see results in the Bookmarks Window and Namespaces section of the Symbol Tree Window.") # type: ignore [name-defined] # noqa: F821
return 0
Expand Down

0 comments on commit fe2a208

Please sign in to comment.