redballoonsecurity / ofrak

OFRAK: unpack, modify, and repack binaries.
https://ofrak.com
Other
1.88k stars 128 forks source link

GUI file view displays most relevant view #516

Open whyitfor opened 2 weeks ago

whyitfor commented 2 weeks ago

What is the use case for the feature? As an OFRAK user, I would like for the GUI file display to default to the most relevant view.

Something like this:

  1. By default, hex view is shown.
  2. If a file is a textfile, then it defaults to the "Text" view
  3. For a complex block, default view is either disassembler or decompilation, if it exists

The current behavior seems to default to the most recent view used for the previously-viewed resource.

Does the feature contain any proprietary information about another company's intellectual property? No.

How would you implement this feature? Agnostic.

Are there any (reasonable) alternative approaches? Probably. The goal is showing the user the most useful view FIRST.

Are you interested in implementing it yourself? Yes, with a bit of guidance.

rbs-jacob commented 2 weeks ago

Probably the easiest way to do this is to update the code here to not just update the tabs list, but also to set the tabId as well.

https://github.com/redballoonsecurity/ofrak/blob/4edbd7dcac5da762036c00d8c9af52ada4c1ec97/frontend/src/views/ContentView.svelte#L64-L84