Add processor check to scripts
fuzzywalls opened this issue · comments
Add processor checks to scripts that only work on certain architectures. Scripts such as MipsRopX that only support the MIPS processor should not be allowed to run against an ARM binary.
This should be relatively simple to do. An example of checking for MIPS may be found in the MIPS constant reference analyzer
However, checking exactly this way will prevent some variants such as the ghidra-emotionengine from passing this check. I'm not sure if it even applies there or not though.
Forgot to add the fix in the commit, but it was addressed in this commit: d0d2eef. Addressed it by checking the processor via currentProgram.getLanguage().getProcessor().toString()
and comparing that against supported processors.