Commit Graph

42 Commits

Author SHA1 Message Date
Luke
b05c03964a Struct reading and disassembly script overhaul, various misc. loading fixes, bump to .NET 9 (#13)
* Bump projects to .net 9 and update nugets

* add VersionedSerialization + source generator

* migrate versioning to StructVersion class, add handling/detection for 29.2/31.2

* add new struct definitions

* rename serialization methods and add BinaryObjectStreamReader for interop

* Rework metadata struct loading to use new struct versioning

* move 29/31.1/.2 to use tags (-2022,-2023) instead of minor versions

* fix metadata usage validity checks

* rework code registration offsetting a bit and add second 29/31.1 condition

* tweak .1 condition (again)

* 29/31.2 was a psyop

* also remove 29.2 from the readme

* remove loading of packed dlls - this was a very unsafe feature

* support auto-recovering type indices from type handles
fixes loading of memory-dumped v29+ libraries since those replacee their class indices on load with a pointer to the corresponding type

* support loading PEs without an export table

* also read UnresolvedVirtualCallCount on regular v31

* Disable plugin loading for now

* Overhaul disassembler script + add Binary Ninja target (#12)

* Overhaul diassembler scripts:
- No longer defines top level functions
- Split into three classes: StatusHandler (like before), DisassemblerInterface (for interfacing with the used program API), ScriptContext (for definiting general functions that use the disassembler interface)
- Add type annotations to all class methods and remove 2.7 compatibility stuff (Ghidra now supports Python 3 so this is unnecessary anymore)
- Disassembler backends are now responsible for launching metadata/script processing, to better support disassembler differences
- String handling is back in the base ScriptContext class, disassembler interfaces opt into the fake string segment creation and fall back to the old method if it isn't supported

* Add Binary Ninja disassembler script backend
This uses the new backend-controlled execution to launch metadata processing on a background thread to keep the ui responsive

* make binary ninja script use own _BINARYNINJA_ define and add define helpers to header

* Update README to account for new script and binary ninja backend

* implement fake string segment functions for binary ninja but don't advertise support

* also cache API function types in binary ninja backend

* fix ida script and disable folders again

* Fix metadata usage issues caused by it being a value type now

* make TryMapVATR overrideable and implement it for ELFs

* Make field offset reading use TryMapVATR to reduce exceptions

* Fix NRE in Assembly ctor on < v24.2

* Update actions workflow to produce cross-platform CLI binaries, update readme to reflect .net 9 changes

* workflow: only restore packages for projects that are being built

* workflow: tweak caching and fix gui compilation

* workflow: remove double .zip in CLI artifact name

* 29/31.2 don't actually exist, this logic is not needed
2024-11-14 14:32:11 +01:00
LukeFZ
98edac1aea Allow usage without the plugins folder 2024-06-24 18:40:19 +02:00
Katy Coe
ea3945688e Plugins: Add global Enabled property 2021-01-26 20:50:34 +01:00
Katy Coe
d665e1b3c8 Plugins: Add IPluginOption.SetFromString() 2021-01-26 11:28:20 +01:00
Katy Coe
d8aeee4850 Plugins: Fix attempting to validate non-required but empty path 2021-01-25 09:33:46 +01:00
Katy Coe
356836e6e4 Plugins: Add additional internal load options 2021-01-12 15:31:24 +01:00
Katy Coe
a9ab4e627c Plugins: Prevent app from starting without plugins 2021-01-12 01:11:05 +01:00
Katy Coe
92451e26ef Plugins: Add ICorePlugin, enable by default 2021-01-12 00:28:08 +01:00
Katy Coe
074f13b2f4 Plugins: Clear stack trace of failed plugins so they can be re-enabled 2021-01-10 17:43:00 +01:00
Katy Coe
71be0f2af2 Update year in copyright messages 2021-01-04 05:26:43 +01:00
Katy Coe
3e3818a2ed Plugins/GUI: Tidy up 2020-12-29 21:05:33 +01:00
Katy Coe
e09002a060 Plugins: Add PluginOptionFilePath.AllowedExtensions 2020-12-29 18:44:42 +01:00
Katy Coe
964d845fd4 Plugins: Add more hooks boilerplate 2020-12-29 01:31:04 +01:00
Katy Coe
84b3b5f9a7 Plugins: Don't force validation on disabled options 2020-12-28 23:10:29 +01:00
Katy Coe
99f1c38b4c Plugins/GUI: Implement conditional option enabling 2020-12-28 08:33:12 +01:00
Katy Coe
096b2d9c5d GUI: Allow plugins to be reset to default options 2020-12-28 01:23:35 +01:00
Katy Coe
40a1785dff Plugins: Add MustExist/MustNotExist/IsFolder to PluginOptionFilePath 2020-12-28 00:01:04 +01:00
Katy Coe
a32a68b02f Plugins: Fail gracefully on multiple instances of same plugin 2020-12-27 23:59:41 +01:00
Katy Coe
4901d9b4bc Plugins: Add StatusUpdate EventHandler<string> overload 2020-12-26 23:39:40 +01:00
Katy Coe
863aa5ed7d Plugins: Implement ReentrantAttribute 2020-12-26 23:32:21 +01:00
Katy Coe
94f13c35df GUI: Don't allow plugins to run without validating options at least once 2020-12-26 00:05:48 +01:00
Katy Coe
1527c9fe17 Plugins: Disable plugin automatically if it throws an exception 2020-12-25 22:31:16 +01:00
Katy Coe
e929d8d97e Plugins: Add LoadPipelineStarting / LoadPipelineEnding, rename IsHandled to FullyProcessed 2020-12-25 22:29:31 +01:00
Katy Coe
9d49d063be Plugins: Refactor existing interfaces into ILoadPipeline 2020-12-25 20:58:46 +01:00
Katy Coe
e7806e2849 CLI: Allow single-character plugin option argument names 2020-12-24 01:23:16 +01:00
Katy Coe
25942a7e6b Plugins: Catch TargetInvocationException -> MissingFieldException on instantiation 2020-12-24 01:10:18 +01:00
Katy Coe
61d86d7d96 Plugins: Pass PluginEventInfo instead of PluginErrorEventArgs to ErrorHandler 2020-12-24 00:12:55 +01:00
Katy Coe
2e7187795a GUI: Load plugins even if plugin window never opened 2020-12-24 00:04:21 +01:00
Katy Coe
62451e5131 Plugins: Add IPlugin.OptionsChanged 2020-12-23 23:55:43 +01:00
Katy Coe
b31db0dac6 Plugins: Include inner exception on plugin load error 2020-12-23 22:29:21 +01:00
Katy Coe
380e87bc0c Plugins: Add validation interface (Validate, InternalValidate) 2020-12-23 22:28:51 +01:00
Katy Coe
0aedc2ec9c Plugins: Allow plugin folder to be changed on Reload() 2020-12-22 03:58:10 +01:00
Katy Coe
8e69f4fe40 Plugins: Enable programmatic access to options 2020-12-22 03:52:57 +01:00
Katy Coe
e058c39f19 Plugins: Add IPostProcessPackage 2020-12-22 03:17:49 +01:00
Katy Coe
3e27cd25e9 Plugins: Simplify event data; add GetStrings and GetStringLiterals 2020-12-21 22:54:01 +01:00
Katy Coe
6971c84960 Plugins: Change PreProcessMetadata to use BinaryObjectStream 2020-12-21 21:40:38 +01:00
Katy Coe
5dc8e823c4 Plugins: Add IPostProcessTypeModel 2020-12-21 19:11:49 +01:00
Katy Coe
c6e9e26111 Plugins: Add PluginEventInfo and IPostProcessMetadata 2020-12-20 23:24:09 +01:00
Katy Coe
735dc2824b Plugins: Add PostProcessMetadata hook 2020-12-19 20:50:37 +01:00
Katy Coe
2aa9b9f45b Plugins: Implement PluginServices 2020-12-19 20:50:05 +01:00
Katy Coe
59437a8138 Plugins: Implement PluginManager 2020-12-19 20:46:58 +01:00
Katy Coe
f71cd04ec7 Plugins: Define IPlugin and IPluginOption interfaces 2020-12-19 20:45:24 +01:00