-
Notifications
You must be signed in to change notification settings - Fork 17
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
Can't enable or disable specific analysers? #24
Comments
I have run into this before... the following code seems to work for me. def get_analysis_options(
self,
prog: "ghidra.program.model.listing.Program"
) -> dict:
"""
Generate dict from program analysis options
Inspired by: Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.java#L1272
"""
from ghidra.program.model.listing import Program
prog_options = prog.getOptions(Program.ANALYSIS_PROPERTIES)
options = {}
for propName in prog_options.getOptionNames():
options[propName] = prog_options.getValueAsString(propName)
return options
def set_analysis_option_bool(
self,
prog: "ghidra.program.model.listing.Program",
option_name: str,
value: bool
) -> None:
"""
Set boolean program analysis options
Inspired by: Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.java#L1272
"""
from ghidra.program.model.listing import Program
prog_options = prog.getOptions(Program.ANALYSIS_PROPERTIES)
prog_options.setBoolean(option_name, value) The code you have looks OK. Try my |
Thanks @clearbluejar for a quick answer!
Maybe I should use something else than |
Hey, is there any way to set analysers? I am trying to set
Options
before callinganalyzeAll
but it doesn't work.Apparently, it should be possible according to NationalSecurityAgency/ghidra#2179
Thanks!
The text was updated successfully, but these errors were encountered: