Open sad-dev opened 1 year ago
Have you considered using bookmarks? I think they match your use case fairly well if you're willing to store everything as a string. They apply to addresses, can be accessed via scripts, and the Bookmarks window (click the purple checkmark icon) along with various filters should get you pretty close. Note that you can define your own categories for bookmarks.
Unless I am mistaken, only one bookmark can be applied to an address at a time. This makes it extremely cumbersome - serializing and deserializing a xml/json/etc. string is the most obvious way to hijack the bookmark for this. It also means that I have to be careful with autoanalysis/scripting as any incoming bookmark might replace my stored values.
If multiple bookmarks on an address is possible then this approach becomes a little more viable as a distasteful hack, but otherwise, it isn't flexible enough to really fit the on-the-fly assignment/modification/deletion of tags - using an external (SQL) database would be easier to script.
It is possible to have multiple bookmarks at a single address if you add them programmatically using a program's BookmarkManager
. If you add a bookmark in the gui, it will automatically assign it a bookmark type of "Note" and also delete any existing bookmarks of that type at that address.
If you create a new bookmark type programmatically and want to see it in the Bookmarks window, you have to click on the little gear icon and select the new type.
I'll give it a try - given multiple bookmark types, I can probably write the necessary helper classes to encode/decode the information I need.
Parsing the bookmarks (for example, to view and filter elements satisfying various value constraints via a TableChooserDialog
) is still an annoyance, but I can work with this for now.
Is your feature request related to a problem? Please describe.
Currently, functions can be tagged (right click -> Function -> Edit tags) with a string tag e.g. "CRYPTO". This is insufficient for most of my tagging needs.
As an example, I was attempting to do the following with the machine learning plugin:
1.) Apply various models on a binary 2.) Tag the addresses with the probabilities different models suggest e.g. "Model1=0.8,Model2=0.5,Model3=0.6..." 3.) Be able to access these tags from scripts
Describe the solution you'd like The tagging system should have the following properties:
1.) Be able to tag addresses and not just functions 2.) Tags should support simple value types e.g. string/integer/double 3.) Tags should be accessible via scripting e.g.
getTagValue(Address, String)
andgetTaggedAddresses(String)
(as well as the corresponding setters) 4.) Something similar to the existing Function Tags window to aid searchingDescribe alternatives you've considered Maintain my own database and helper scripts to interface with it, or look into plugin-based storage.