From 6bad309eb6718fe4f5260c731c8e49654f0f7b08 Mon Sep 17 00:00:00 2001 From: pancake Date: Fri, 21 Aug 2026 18:47:48 +0200 Subject: [PATCH] Add w0rdle tests for ObjectPool decode, string/method recovery and header JSON --- test/custom/appstrings-android-w0rdle.json | 12 ++++++++++++ test/custom/header-json-android-w0rdle.json | 14 ++++++++++++++ test/custom/methods-android-w0rdle.json | 14 ++++++++++++++ test/custom/objdecode-android-w0rdle.json | 12 ++++++++++++ test/custom/objdecode-func-android-w0rdle.json | 12 ++++++++++++ test/custom/pool-android-w0rdle.json | 14 ++++++++++++++ 6 files changed, 78 insertions(+) create mode 100644 test/custom/appstrings-android-w0rdle.json create mode 100644 test/custom/header-json-android-w0rdle.json create mode 100644 test/custom/methods-android-w0rdle.json create mode 100644 test/custom/objdecode-android-w0rdle.json create mode 100644 test/custom/objdecode-func-android-w0rdle.json create mode 100644 test/custom/pool-android-w0rdle.json diff --git a/test/custom/appstrings-android-w0rdle.json b/test/custom/appstrings-android-w0rdle.json new file mode 100644 index 0000000..d39376b --- /dev/null +++ b/test/custom/appstrings-android-w0rdle.json @@ -0,0 +1,12 @@ +{ + "name": "appstrings-android-w0rdle", + "cwd": "test", + "cmd": ["../bin/r2flutter", "-q", "-z", "bins/android/w0rdle/libapp.so"], + "timeout": 30, + "expect": { + "contains": [ + "assets/allowed_guesses.txt", + "ph0wn CTF is awesome" + ] + } +} diff --git a/test/custom/header-json-android-w0rdle.json b/test/custom/header-json-android-w0rdle.json new file mode 100644 index 0000000..14bc8f0 --- /dev/null +++ b/test/custom/header-json-android-w0rdle.json @@ -0,0 +1,14 @@ +{ + "name": "header-json-android-w0rdle", + "cwd": "test", + "cmd": ["../bin/r2flutter", "-Hj", "bins/android/w0rdle/libapp.so"], + "timeout": 30, + "expect": { + "json": { + "dart_version": "2.18.0", + "hash": "b0e899ec5a90e4661501f0b69e9dd70f", + "cws": 4, + "tag_style": "CID_SHIFT1" + } + } +} diff --git a/test/custom/methods-android-w0rdle.json b/test/custom/methods-android-w0rdle.json new file mode 100644 index 0000000..9472a1e --- /dev/null +++ b/test/custom/methods-android-w0rdle.json @@ -0,0 +1,14 @@ +{ + "name": "methods-android-w0rdle", + "cwd": "test", + "cmd": ["../bin/r2flutter", "-q", "-f", "bins/android/w0rdle/libapp.so"], + "timeout": 30, + "expect": { + "contains": [ + "method.WordService.getWordToFind", + "method.WordService._readFile_746434692", + "method.Flutterdle.didWin", + "method.CachingAssetBundle.loadString" + ] + } +} diff --git a/test/custom/objdecode-android-w0rdle.json b/test/custom/objdecode-android-w0rdle.json new file mode 100644 index 0000000..0081529 --- /dev/null +++ b/test/custom/objdecode-android-w0rdle.json @@ -0,0 +1,12 @@ +{ + "name": "objdecode-android-w0rdle", + "cwd": "test", + "cmd": ["../bin/r2flutter", "-O", "pp+36864", "bins/android/w0rdle/libapp.so"], + "timeout": 30, + "expect": { + "contains": [ + "target.kind: string", + "target.name: \"floatingActionButtonTheme\"" + ] + } +} diff --git a/test/custom/objdecode-func-android-w0rdle.json b/test/custom/objdecode-func-android-w0rdle.json new file mode 100644 index 0000000..508cab4 --- /dev/null +++ b/test/custom/objdecode-func-android-w0rdle.json @@ -0,0 +1,12 @@ +{ + "name": "objdecode-func-android-w0rdle", + "cwd": "test", + "cmd": ["../bin/r2flutter", "-O", "pp+1240", "bins/android/w0rdle/libapp.so"], + "timeout": 30, + "expect": { + "contains": [ + "target.kind: function", + "target.name: \"method." + ] + } +} diff --git a/test/custom/pool-android-w0rdle.json b/test/custom/pool-android-w0rdle.json new file mode 100644 index 0000000..6bab261 --- /dev/null +++ b/test/custom/pool-android-w0rdle.json @@ -0,0 +1,14 @@ +{ + "name": "pool-android-w0rdle", + "cwd": "test", + "cmd": ["../bin/r2flutter", "-p", "bins/android/w0rdle/libapp.so"], + "timeout": 30, + "expect": { + "contains": [ + "length: 12351 entries" + ], + "not_contains": [ + "PP not resolved" + ] + } +}