Skip to content

Add Attributes from the GUI#734

Open
AndreQuimper wants to merge 3 commits into
redballoonsecurity:masterfrom
AndreQuimper:feature/573-attr-from-gui
Open

Add Attributes from the GUI#734
AndreQuimper wants to merge 3 commits into
redballoonsecurity:masterfrom
AndreQuimper:feature/573-attr-from-gui

Conversation

@AndreQuimper
Copy link
Copy Markdown

  • I have reviewed the OFRAK contributor guide and attest that this pull request is in accordance with it.
  • I have made or updated a changelog entry for the changes in this pull request.

One sentence summary of this PR (This should go in the CHANGELOG!)
Added add_attribute and get_all_resource_attributes endpoints to server.py and Button/View to GUI to allow adding ResourceAttribtues manually from GUI, supporting certain workflows like flash unpacking (#573)

Link to Related Issue(s)
#573

Please describe the changes in your request.
Added a button to the AttributesView that displays a view that allows users to manually add ResourceAttributes through the GUI. There is a dropdown menu that lists all resource attributes for ease of selection (with hotkeys for search). Nested attributes can be added through a JSON text input. AttributesView updates automatically after new attributes are added.

Much of the code is largely based on that for the Add Tag functionality, including code in remote_resource.js and AddAttributesView.svelte (mirrors AddTagView.svelte)

Besides unit tests, for manual testing using flash_test_plain.bin do:

  1. Add FlashResource tag using toolbar button
  2. Add FlashAttributes using new button/view and the following JSON to configure for the test image:
{
    "data_block_format": [
      ["ofrak.core.flash.FlashField", {"field_type": "ofrak.core.flash.FlashFieldType.DATA", "size": 223}],
      ["ofrak.core.flash.FlashField", {"field_type": "ofrak.core.flash.FlashFieldType.ECC", "size": 32}]
    ],
    "ecc_attributes": ["ofrak.core.flash.FlashEccAttributes", 
       {"ecc_class": ["ofrak.core.ecc.reedsolomon.ReedSolomon", {"nsym": 32}]}
    ]
}
  1. Unpack now works for Flash image.

Anyone you think should look at this, specifically?
@whyitfor

@whyitfor whyitfor requested a review from rbs-jacob April 14, 2026 21:41
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.

1 participant