Skip to content
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

Bugfix: IDA mnemonics fallback for architectures not supported by capstone #21

Closed

Conversation

dominikbayerl
Copy link
Contributor

quokka.CapstoneErrors are currently not handled appropriately, i.e. if you try to get instruction listings for an architecture not supported by capstone, you receive the error quokka.exc.CapstoneError: Unable to find the Architecture:

try:
capstone_arch, capstone_mode = mapping.get(arch)
except TypeError as exc:
raise quokka.CapstoneError("Unable to find the Architecture") from exc

This patch addresses this, by handling quokka.CapstoneError with a proper fallback to the IDA disassembly, at least for instruction mnemonics.

patacca and others added 27 commits June 20, 2023 15:45
* Add support for older IDA versions (7.0 - 7.4).

Signed-off-by: Dominik Bayerl <[email protected]>

* Bugfix.
- term-Callback must be nullptr for PLUGIN_MULTI plugins
- run-Callback must be nullptr for PLUGIN_MULTI plugins

Signed-off-by: Dominik Bayerl <[email protected]>

* Remove unrelated change

---------

Signed-off-by: Dominik Bayerl <[email protected]>
Co-authored-by: Riccardo Mori <[email protected]>
Starting from IDA SDK 8.2 the path of the library on windows changed by
appending the edition ("pro", "teams" and presumably "home").
Fix compatibility with IDA 8.{1,2} and cleanup
This might cause errors when having a fake chunk as the very last chunk
in the code. This might happen when having some orphan asm code at the
very end.
If we don't resize it, that fake chunk will have end_addr == BADADDR, so
it will basically be unlimited. This might result in errors when binary
searching for chunks.
…ted by capstone.

quokka.CapstoneErrors are currently not handled appropriately, i.e. if you try to get
instruction listings for an architecture not supported by capstone, you receive the
error `quokka.exc.CapstoneError: Unable to find the Architecture`.

This patch addresses this, by handling quokka.CapstoneError with a proper fallback
to the IDA disassembly.

Signed-off-by: Dominik Bayerl <[email protected]>
@dominikbayerl
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants