[ ] I have reviewed the OFRAK contributor guide and attest that this pull request is in accordance with it.
One sentence summary of this PR (This should go in the CHANGELOG!)
Add a step-by-step interface to the GUI to interactively configure a source code patch to a binary using PatchMaker.
Link to Related Issue(s)
The PatchFromSourceModifier and FunctionReplaceModifier can be run through the GUI to accomplish source code patching, but require the user to have some understanding of the goal beforehand. If anything goes wrong during these Modifiers' execution, the user has to inspect the OFRAK logs and possible temp build dirs to understand what step went wrong and how to correct the problem.
Please describe the changes in your request.
Add an interface in the GUI providing separate steps to:
Upload patch source code files, select a toolchain, and change the toolchain config
Select which segments from each compiled patch file to inject, where to place them in memory, and different methods to create available free space to place these segments.
Define any symbols the patch requires and are not provided by analysis on the target binary.
Refactor some frontend code:
The "global" view, which App.svelte uses to determine the main view the user sees, is set up as a stack, rather than just the one stack view. This "global" view, the topLevelView, is right now either the StartView, the normal resource tri-pane, ProjectManagerView, or RootWizardView. This change is not strictly necessary.
The SerializerInputForm is split into multiple, more specific components, which cut down on the state that each type of serializer input requires reasoning about. Thanks to this, the serializer inputs now each all handle default inputs AND existing inputs - that is, if the serializer input is bound to variable X, and X already has a value, the serializer input is correctly prepopulated to reflect X.
Fully backwards-compatible small refactor to the backend. Rather than add another 1000 lines of code to server.py, I added a modules directory with a patch_wizard.py containing all the Patch Wizard functionality and routes, and a bit of code in the main server class constructor to add all the routes defined by a hardcoded list of modules (currently only the patch wizard).
Anyone you think should look at this, specifically?
@rbs-jacob
One sentence summary of this PR (This should go in the CHANGELOG!) Add a step-by-step interface to the GUI to interactively configure a source code patch to a binary using PatchMaker.
Link to Related Issue(s) The PatchFromSourceModifier and FunctionReplaceModifier can be run through the GUI to accomplish source code patching, but require the user to have some understanding of the goal beforehand. If anything goes wrong during these Modifiers' execution, the user has to inspect the OFRAK logs and possible temp build dirs to understand what step went wrong and how to correct the problem.
Please describe the changes in your request.
topLevelView
, is right now either the StartView, the normal resource tri-pane, ProjectManagerView, or RootWizardView. This change is not strictly necessary.SerializerInputForm
is split into multiple, more specific components, which cut down on the state that each type of serializer input requires reasoning about. Thanks to this, the serializer inputs now each all handle default inputs AND existing inputs - that is, if the serializer input is bound to variable X, and X already has a value, the serializer input is correctly prepopulated to reflect X.server.py
, I added amodules
directory with apatch_wizard.py
containing all the Patch Wizard functionality and routes, and a bit of code in the main server class constructor to add all the routes defined by a hardcoded list of modules (currently only the patch wizard).Anyone you think should look at this, specifically? @rbs-jacob