diff --git a/.gitignore b/.gitignore index 458c89c..c1f47a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ build/ -bin/r2flutter +bin *.o *.so *.dylib diff --git a/README.md b/README.md index 6847b11..382ba20 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # r2flutter - Dart/Flutter support for Radare2

- +

This utility integrates with radare2 but does NOT rely on r2 analysis (afl/aflj). @@ -10,44 +10,46 @@ snapshots/constant pool directly to derive names and addresses. ## Features +- Support iOS and Android Flutter apps - Derives names/addresses from Dart constant pool (no afl parsing) - Uses radare2 to locate AOT snapshot symbols within ELF64 - Emits `addNames.r2` and `r2_dart_struct.h` ## Building +This project can be used from the system shell or directly integrated inside radare2: + ```bash make ``` +To get the plugin inside your r2 shell do that: + +```bash +make user-install +``` + ## Usage ```bash -./r2flutter [options] +$ bin/r2flutter +Usage: bin/r2flutter [options] +Options: + -h, --help Show help + -V, --version Show version + -v Verbose (stderr info) + -vv More verbose (dump headers) + --no-stubs Do not emit ELF/r2 stub functions + --dump-snapshot-json Print snapshot header as a single JSON line + --dump-it Print instruction table entry addresses to stderr + --quiet Suppress non-essential stdout (only JSON if requested) + --no-dump Do not emit radare2 flags/script to stdout + --dump-fns N Print first N functions (addr name) to stdout + --use-name-pool Assign names from data image strings when unknown +$ ``` -Options - -- `-h`, `--help`: Show help -- `-V`, `--version`: Show version -- `-v` / `-vv`: Increase verbosity on stderr (prints snapshot hash, header info) -- `--no-stubs`: Do not emit ELF/r2 stub functions into the output -- `--dump-snapshot-json`: Print a single-line JSON with snapshot header and clustered header fields -- `--dump-it`: Print InstructionTable indices and resolved addresses to stderr - ## Dependencies - radare2 (with development headers) - pkg-config - -## Architecture - -- `main.c` - CLI entry, opens file with radare2 -- `dart_app.c` - App model and integration - - `dart_pool_parse.c` - Standalone parser entry (finds snapshot blobs via r2; WIP: decodes clustered snapshot/ObjectPool and emits function entrypoints) -- `dart_dumper.c` - Emits radare2 scripts and pool offset flags (via PP/x27) - -## Current Status - -This component sources names from the Dart ObjectPool (work-in-progress), mirroring -`blutter`, without using afl or depending on Dart VM. diff --git a/r2flutter.png b/doc/images/r2flutter.png similarity index 100% rename from r2flutter.png rename to doc/images/r2flutter.png diff --git a/r2flutter.svg b/doc/images/r2flutter.svg similarity index 100% rename from r2flutter.svg rename to doc/images/r2flutter.svg diff --git a/r2flutter500.png b/doc/images/r2flutter500.png similarity index 100% rename from r2flutter500.png rename to doc/images/r2flutter500.png