Sark icon indicating copy to clipboard operation
Sark copied to clipboard

Does Sark cover accessing strings or other constant symbols?

Open NSExceptional opened this issue 3 years ago • 2 comments

I don't see any APIs for accessing strings and things like that. IDA's API for strings seems pretty straightforward I guess, so is that why you didn't include your own wrapper?

Edit: I lied it is NOT straightforward

NSExceptional avatar May 27 '21 21:05 NSExceptional

If you're asking about accessing strings from the strings window, and getting constant values - then no, There is no support for that currently.

I did not use those APIs enough while developing Sark, so I never considered developing wrappers for them. I'll welcome a PR if you're willing to write one.

As for string APIs - we do have sark.data.get_string(ea) and some similar APIs, if that is relevant to you.

tmr232 avatar May 28 '21 05:05 tmr232

Gotcha. I do a lot of Objective-C reverse engineering so the strings window is useful for finding specific method calls via xrefs to strings.

I will leave this open for now because I will probably have more questions soon, now that you've helped me figure out how to get a segment by name. My current strategy is to enumerate the lines of the text segment to see if that will do for my needs.

I'm making a VS Code extension to interact with the most commonly used parts of IDA, so I need to be able to replicate the information provided by the strings window, such as searching for strings and viewing xrefs.

NSExceptional avatar May 28 '21 18:05 NSExceptional