Commit Graph

1306 Commits

Author SHA1 Message Date
Luke
193395db29 Change Bin2Object URL to point to forked repo instead 2025-10-12 17:28:16 +02:00
LukeFZ
481d05668d (hopefully) lower python requirement to 3.8 2025-10-12 17:13:20 +02:00
LukeFZ
ca6c958f9a add pyghidra runtime annotation to fix support 2025-10-12 17:08:19 +02:00
LukeFZ
7a621b40c6 fix support for properties without methods 2025-09-26 00:30:59 +02:00
LukeFZ
1a418280fb update bin2object (again) 2025-09-26 00:28:51 +02:00
LukeFZ
f1a69cafe3 fix support for 35+, add support for 39 2025-09-18 23:36:57 +02:00
LukeFZ
e5f2fa703d update bin2object 2025-09-18 23:35:48 +02:00
LukeFZ
38aa333764 fix workflow pnpm install and caching 2025-09-03 23:11:01 +02:00
LukeFZ
3ae9dba60d improve caching in workflow, remove duplicated .net install steps 2025-09-03 23:04:23 +02:00
LukeFZ
c94bc1c225 update tauri js deps, make pnpm install always run on release build 2025-09-03 23:01:01 +02:00
TrialCarrot
ac361bd90f build: auto run pnpm install if node_modules/ doesn't exists (#24)
Co-authored-by: TrialCarrot <TrialCarrot@users.noreply.github.com>
2025-09-03 22:57:55 +02:00
LukeFZ
a88e91451a add (untested) support for metadata v38 2025-08-22 04:53:00 +02:00
LukeFZ
079373815f update readme to inform about the new UIs 2025-08-15 21:28:58 +02:00
Luke
3439ca912b Implement new GUI and CLI, fix misc. smaller issues (#22)
* Initial commit of new UI c# component

* Initial commit of new UI frontend component

* target WinExe to hide console window in release mode, move ui exe into resources

* force single file publishing and add initial gh workflow for publishing ui

* fix workflow errors

* update dependencies and remove cxxdemangler, as it was outdated

* fix c# single file output due to invalid output path

* smaller tweaks, hack around loops in cpp type layouting

* process other queued exports even if one fails and show error message

* add basic support for processing LC_DYLD_CHAINED_FIXUPS

* ELF loading should not use the file offset for loading the dynamic section

* fix symbol table loading in some modified elfs

* add "start export" button on format selection screen, clear all toasts after selecting an export format

* embed ui executable directly into c# assembly

* only build tauri component in c# release builds

* add il2cpp file (binary, metadata) export to advanced tab

* fix and enable binary ninja fake string segment support

* add support for metadata

* unify logic for getting element type index

* fix new ui not allowing script exports other than ida

* new ui: clear out loaded binary if no IL2CPP images could be loaded

* fix toAddr calls in ghidra script target

* remove dependency on a section being named .text in loaded pe files

* tweak symbol reading a bit and remove sht relocation reading

* add initial support for required forward references in il2cpp types, also fix issues with type names clashing with il2cpp api types

* reduce clang errors for header file, fix better array size struct, emit required forward definitions in header

* expose forward definitions in AppModel, fix issue with method-only used types not being emitted

* remove debug log line

* fix spelling mistakes in gui outputs

* fix il2cpp_array_size_t not being an actual type for later method definitions

* change the default port for new ui dev to 5000

* show current version and hash in new ui footer

* seperate redux ui impl into FrontendCore project

* make inspector version a server api, split up output subtypes and tweak some option names

* add redux CLI based on redux GUI output formats

* replace all Console.WriteLine calls in core inspector with AnsiConsole calls

* add workflow for new cli and add back old gui workflow

* disable aot publish and enable single file for redux cli
2025-08-15 21:13:32 +02:00
TrialCarrot
e161e0f226 Fix #14: Error while dotnet publish -c Release (#21)
Co-authored-by: TrialCarrot <TrialCarrot@users.noreply.github.com>
2025-07-18 16:32:20 +02:00
Luke
ec76447122 Fix misc. issues in the generated disassembler scripts (#17)
* attempt to fix ghidra script issues

* add ghidra python 3 note to readme

* fix binary ninja script erroring on function type parsing

* fix ida script not skipping function creation on pe binaries

* fix writing of multibyte strings breaking fake string segment

* also adjust binja write_string impl
2025-01-25 14:21:56 +01:00
LukeFZ
4e46c29cee Merge branch 'master' of https://github.com/LukeFZ/Il2CppInspectorRedux 2024-12-13 20:58:57 +01:00
LukeFZ
507c42024e Fix loading of 32-Bit binaries by removing shadowed Bits property 2024-12-13 20:58:41 +01:00
Luke
8403f8a62d Fix incorrect if condition in GetVTable causing them to all be empty 2024-11-19 00:13:26 +01:00
LukeFZ
5254c4b85a adjust v24.4<->v24.5 condition and update sln file 2024-11-17 23:20:50 +01:00
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
5b0476fcc5 add remaining 31.1/31.2 versioning conditions 2024-08-18 23:23:32 +02:00
LukeFZ
4ce4d0e799 backport 29/31 version fixes from new versioning branch 2024-08-18 23:20:49 +02:00
commonuserlol
665e70324f Ghidra script improvements (#7)
* Always set image base to 0 for Ghidra

* Script improvements

Everything here is for Ghidra:
* Use `%` instead of f-string (Ghidra still uses python 2.7, meanwhile f-strings were added in 3.6)
* Handle errors when applying type (Ghidra throws exception unlike IDA)
* Don't trigger decompiler (analysis will be faster)
* Revert back string literals

* Set image base to zero only for ELF

I don't know about PE with Ghidra

* Update README for disassemblers

* IDA 7.6 required due `ida_ida.inf_is_32bit_exactly()`

* Ghidra now don't launch decompiler for whole binary

* Set image base to 0 in script

Remove %IMAGE_BASE% since we don't use it anymore

* Create XREFs for Ghidra

Now you can jump from `MethodInfo` to actual method

* Fix demangler for Ghidra

Ghidra's demangler can process only functions in auto analysis. Now both `TypeInfo` and `MethodInfo` are displayed properly

---------

Co-authored-by: commonuserlol <commonuserlol@users.noreply.github.com>
2024-08-10 21:00:41 +02:00
LukeFZ
61087849bd Merge branch 'master' of https://github.com/LukeFZ/Il2CppInspectorRedux 2024-07-15 16:11:42 +02:00
LukeFZ
b4aaa8df5e Make script paths always use / as the path seperator to be cross-compatible 2024-07-15 16:11:24 +02:00
LukeFZ
85154ded5b update readme to refer to this repo and net8.0 folders 2024-07-15 16:11:03 +02:00
Luke
bc8c7c87e0 Merge pull request #5 from commonuserlol/master
Print banner only on windows
2024-07-14 22:06:48 +02:00
commonuserlol
9855aa3b3f Print banner only on windows
TLDR: GetVersionInfo works only with PE Header

Reference: https://stackoverflow.com/questions/63773485/c-sharp-fileversioninfo-getversioninfo-not-working-on-mac-os
2024-07-10 19:32:02 +03:00
LukeFZ
87766f6f96 Add support for metadata version 29.2 and 31 2024-06-24 18:41:14 +02:00
LukeFZ
98edac1aea Allow usage without the plugins folder 2024-06-24 18:40:19 +02:00
Luke
396c222ac5 Tweak 29.1 heuristic 2024-06-24 14:18:49 +02:00
Luke
04263803e3 Fix CLI crashing on launch in single file builds 2024-05-24 03:19:46 +02:00
Luke
692f4e05ef Fix ghidra script output 2024-05-24 03:09:00 +02:00
LukeFZ
b21b6e89ab properly fix scoped name for generic arrays 2024-02-27 17:34:24 +01:00
LukeFZ
1e27f8672d Dump default bytearray value as base64 in c# output 2024-02-25 15:26:46 +01:00
LukeFZ
eababc31f3 Add fallback to invalid compressed int in BlobReader 2024-02-25 15:24:09 +01:00
LukeFZ
e328ed9b84 just check for FullName == null in getScopedFullname 2024-02-25 15:23:58 +01:00
LukeFZ
2a492e02ba Update getScopedFullName for generic params + update README 2024-02-25 11:32:20 +01:00
LukeFZ
0f7cd027c3 create fake string segment to allow ida to show the actual strings, also add custom xref between methodinfo and method when both exist 2024-02-16 11:43:15 +01:00
LukeFZ
42d97813df Fix idaclang support for 8.3 2024-02-16 09:49:00 +01:00
LukeFZ
939bedac57 Skip function boundaries when a .pdata segment is detected, add (very slow) folder creation which is disabled by default 2024-02-13 15:02:16 +01:00
LukeFZ
55532fdc8a Overhaul IDA script output and add progress waitbox 2024-02-13 06:48:36 +01:00
LukeFZ
6b060c274a Fix assembly shim output for older Unity versions due to non-explicit class layouts 2023-12-10 21:58:22 +01:00
LukeFZ
7b03b939a0 Fix some issues loading ELFs with invalid SHTs and broken symbol entries 2023-12-09 14:01:54 +01:00
LukeFZ
ef56ebbd2f Fix header generation when a struct contains an enum pointer 2023-12-07 20:53:03 +01:00
LukeFZ
1d2890961c Fix custom attribute parsing when a null array is used and when an assembly has no attributes 2023-12-07 20:52:06 +01:00
LukeFZ
5b1d9c67d1 Add name mangling to Methods/MethodInfo/TypeInfo/TypeRef, remove Boxing from ValueTypes when used as the this parameter, fix crashes when a module has no attributes 2023-12-06 20:09:35 +01:00
LukeFZ
e9434f4cad Add better il2cpp_array_size_t definition for script outputs in versions post 2017.2.1, fix some other cpp gen issues 2023-12-02 11:22:32 +01:00
LukeFZ
f1cb0d14a2 Export FieldInfo/FIeldRva contents into script metadata and import as comments 2023-12-02 08:27:12 +01:00