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

Hello from ScratchABit, "interactive disassembler with IDAPython-compatible plugin API" #32

Closed
pfalcon opened this issue Dec 28, 2017 · 8 comments

Comments

@pfalcon
Copy link

pfalcon commented Dec 28, 2017

I bet you implemented more of idaapi: https://github.com/pfalcon/ScratchABit/blob/master/idaapi.py

But I have cute UI attached ;-) :

shot

@williballenthin
Copy link
Owner

hey @pfalcon

You're project is quite neat; I've kept my eyes on it over the years.

Do you see a way that we can integrate our projects? Like perhaps to initialize a ScratchABit workspace from an existing IDB?

@pfalcon
Copy link
Author

pfalcon commented Dec 29, 2017

You're project is quite neat; I've kept my eyes on it over the years.

Ah cool! I wished I'd have known about your project earlier. At least, as it's from this summer, I didn't miss it by a lot.

Do you see a way that we can integrate our projects?

Well, I'd love if there was a way ;-).

Like perhaps to initialize a ScratchABit workspace from an existing IDB?

Well, such a feature would be interested for someone regularly using IDA, or having many IDB files. I'm neither. I'd even think that the better approach would be to write a converter from IDB to ScratchABit's textual DB format.

But I find "example: run an existing IDAPython script" section of the README to be really cool, that's what I'd target for ScratchABit, except that myself I didn't have a strong need for going beyond a single CPU plugin so far. But I submitted pfalcon/ScratchABit#26 to remind to try to reuse python-idb implementation of the API rather than code it from scratch. It would be cool is someone with enough interest tried to run some plugin with ScratchABit and added missing pieces (which are many) ;-).

I won't be able to lead that anytime soon I guess, the next goal for ScratchABit is to develop a Capstone-based CPU plugin(s). But now that ScratchABit is mostly "done" (new functionality would be added via plugins), I switched to trying to get some juice out of 2.5 years of ScratchABlock development, and decompilation is of course much less trivial than writing a TUI around a disassembly module ;-).

@pfalcon
Copy link
Author

pfalcon commented Jan 25, 2018

@williballenthin : Here's another thing which would be helpful, if you have time/interest: People are starting to ask how to add more functionality to ScratchABit, e.g. pfalcon/ScratchABit#31, and I'd of course like to do that using IDAPython-compatible "UI" plugins. But I never played with such, so that matter is in log backlog for me. Maybe you could point to a simple, sample-like plugin which adds itself to menu, assign to a key, then shows a dialog with some info?

Thanks in advance, and nevermind if you aren't interested/too busy for that.

@williballenthin
Copy link
Owner

IDACyber is a plugin that was released recently that adds a menu item and registers a hotkey. It also displays a user interface via Qt. ref: https://github.com/patois/IDACyber

The interesting part where it registers as a plugin is here: https://github.com/patois/IDACyber/blob/78a47699d22e49c40cc79e2d34dea5f75134cfde/idacyber.py#L552

@pfalcon
Copy link
Author

pfalcon commented Jan 25, 2018

Thanks. That's what I meant by "simple" and "sample" - no Qt's and stuff ;-). Anyway, I guess I'll need to do my own legwork into it and figure out if writing such plugins (which e.g. do something and show something in status line) is possible. I very well remember times when there was no Qt in IDA, the question is whether it was possible to write IDAPython plugins then, and/or whether those APIs available in IDAPython...

@thesourcerer8
Copy link

I have a huge need for the migration from IDB to ScratchABit/ScratchABlock. I have some code that we might be able to use to generate idc scripts or their Python equivalent from .idb, and ScratchABit can use those now. Give me a few days, I have to dig it up. But if you succeed to integrate python-idb into ScratchABit, as a Loader plugin perhaps?, or as a converter, that might be even better. If you have the time, please give it a try!

@thesourcerer8
Copy link

Ok, I have some working code:
http://www2.futureware.at/~philipp/ssd/ExportScratchABit.py
A python script exporter that generates Python code to import data from idb to ScratchABit.
It is based on a CSV exporter I developed some time ago:
http://www2.futureware.at/~philipp/ssd/exportfuncs.py

@williballenthin
Copy link
Owner

closing as discussion appears complete

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

No branches or pull requests

3 participants