Commit Graph
56 Commits
Author SHA1 Message Date
Momoko-Ayase 20a68b1c73 feat(gui): finalize native desktop release 1.4.0
Apply the reviewed five-language wording and action-button sizing fixes. Preserve serialized English messages and report wire values.

Honor configured resource limits during added-file identification, with regression tests for UI requests and native package inspection.

Build and package the CLI and desktop app together in CI and release archives, including the font license and usage instructions. Bump workspace and browser bindings to 1.4.0 without upgrading third-party dependencies.
2026-11-11 11:53:16 +08:00
Momoko-Ayase 5121ec8ee3 feat(gui): add a native desktop front end
senbei-gui is an egui window over the same engine the CLI runs, in
process. Files, folders, and Android packages go into an inputs list,
where unpack, dry run, and inspect run them with live progress, a
per-input log, and cancel between inputs. The detail pane shows what a
run found: recognition, routes, stages, validation, and digests; the
research evidence an inspection collects; a hex view of the original,
spliced, or restored bytes with regions and RVA navigation; a header and
section compare of input and restored image; and package entries.

Restored bytes from an inspection or dry run stay in memory for the
session, up to a per-input cap. Settings cover the display language, the
output folder, the log file, worker threads, folder probing, Android
limits, and that cap. The window shows the legal notice on first start.

The window speaks the five languages the CLI does, from a catalog
generated from the approved mockup wording. Its UI layer builds for
wasm32 behind a Backend trait; the native backend runs jobs on worker
threads. The crate is a workspace member but not a default one, so a
plain cargo build still builds only the CLI.
2026-11-10 02:09:21 +08:00
Momoko-Ayase f0140cbf2b feat(io): add the hooks a desktop front end needs
A front end can now classify one input the way a single-file run
dispatches it, count targets while a folder scan runs, read one package
entry under the archive ceilings, splice a loader with its companion for
viewing, and stamp live log lines with milliseconds. A RunObserver also
sees each input's report before an inspection or dry run drops its
outputs, so it can keep the restored bytes it wants. The CLI uses none
of these, and its output is unchanged.
2026-11-10 02:07:58 +08:00
Momoko-Ayase 7ab381438f fix(android): report the version of embedded metadata
The metadata a restored library carried was reported with no version, so
its entry read metadata_version null in --json and showed no version in
the text report. The entry now takes the version from the blob's header.
2026-11-10 02:06:42 +08:00
Momoko-Ayase 7a1f3c52d5 fix(io): print an error cause that repeats its wrapper once
A wrapper error that displays its inner error and also returns it as its
source made the chain print that text twice, as in "restore protected
library: restore protected library: ...". A message's English now skips
a link that only repeats the one before it.
2026-11-10 02:04:09 +08:00
Momoko-Ayase b2286dec1c fix(android): keep why a loose library failed
A protected library added on its own whose restore failed reported an
empty error list, and its failure profile carried an empty reason in
both the route and the profile errors. The report now records the error
it already printed, so the text report shows the reason and --json
carries it in all three places.
2026-11-10 02:04:09 +08:00
Momoko-Ayase 3b28f1aaa4 feat(cli): document SENBEI_LANG in --help
The help now names the display-language variable, its values, the
fallback to the system language, and that JSON and saved logs stay
English. It is printed between the resource limits and the exit codes,
in every language.
2026-11-08 03:27:48 +08:00
Momoko-Ayase 4853fe22c0 feat: localize console output and add a run observer
Engine errors, integrity findings, and driver outcomes carry message
codes from senbei-i18n, with their English unchanged, so reports, logs,
and --json stay byte-identical. Verbose pipeline steps go through a
progress sink instead of println!, and an error chain is translated
through its first coded cause.

The CLI takes the display language from SENBEI_LANG, or else from the
system's preferred UI language, and translates console text: usage
errors, help, per-file lines, the run summary, and the summary lines of
the inspect report. Structural research evidence and saved logs stay
English. When a translation leaves out context the English chain has,
the English follows on a muted line.

A front end can attach a RunObserver and a CancelToken to the Collector
to follow a run input by input, receive verbose steps as events, and
stop before the next input. A cancelled report says so. The CLI never
cancels, so its JSON is unchanged.
2026-11-08 02:41:04 +08:00
Momoko-Ayase 9481b0ccf9 feat(i18n): add the senbei-i18n message catalog
Every piece of user-facing text becomes a variant of Msg (engine and
driver messages), Step (verbose pipeline steps), Term (report values),
or Cli (command-line wording). Each language module renders every
variant, so a missing translation, an unknown placeholder, or a dropped
argument is a compile error.

English is the wording Senbei already prints, copied verbatim. Simplified
Chinese, Traditional Chinese, Japanese, and Korean translate it. A
Message keeps the recorded English next to its optional code, so
reports, logs, and JSON stay English while a front end shows the
translation.
2026-11-08 02:24:29 +08:00
Momoko-Ayase 4d211166bf chore: spell the product name CrackProof
Match the capitalization the research documentation uses, in comments,
messages, tests, and the web app. Lowercase identifiers and URLs are
unchanged.
2026-11-07 17:02:48 +08:00
Momoko-Ayase 7fde1809c7 fix(cli): color unpack and inspect terminal output
Share a scoped terminal palette across unpack progress, summaries and rich research reports. Add auto, always and never color modes with stream-specific terminal checks, NO_COLOR handling and Windows virtual-terminal support.

Keep report data, redirected auto output, JSON and saved run logs plain. Test color roles, quiet behavior, policy restoration and escape-free artifacts.
2026-11-06 03:16:18 +08:00
Momoko-Ayase 1ee4344c1e fix(inspect): collect full static recovery research by default
Inspect the protected input and actual recovered image, with bounded structural evidence, source identities and scoped recovery traces. Keep ordinary unpack lightweight and retain no research output files or logs.

Preserve Android extraction, restoration and metadata evidence, distinguish incomplete analyses from rejected candidates, and render detailed text and JSON reports with explicit address provenance.
2026-11-06 02:33:45 +08:00
Momoko-Ayase 05a4337a5e fix(report): leave failed metadata protection recognition unresolved 2026-11-05 23:14:35 +08:00
Momoko-Ayase df81163b3d refactor(wasm): name the metadata transform result type 2026-11-05 23:11:33 +08:00
Momoko-Ayase 0182eff772 feat(cli): scope worker limits and benchmark deterministic runs 2026-11-05 23:08:48 +08:00
Momoko-Ayase dfbbef5226 feat(web): show recovery profiles and export guarded local reports 2026-11-05 23:06:19 +08:00
Momoko-Ayase 7e6664d89e feat(cli): add inspect, dry-run and structured reports 2026-11-05 23:02:24 +08:00
Momoko-Ayase 767eae2a79 test: add bounded fuzz targets and native-WASM parity 2026-11-05 22:20:09 +08:00
Momoko-Ayase e0dc177885 test(corpus): add commit-linked local regression reports 2026-11-05 22:15:09 +08:00
Momoko-Ayase 3fff15ed9a feat(integrity): diagnose restored PE and ELF table inconsistencies 2026-11-05 22:06:18 +08:00
Momoko-Ayase 1d64c732d9 refactor(metadata): centralize verified layout definitions 2026-11-05 21:36:32 +08:00
Momoko-Ayase 682beae9e7 feat(profile): report detection and recovery evidence 2026-11-05 21:34:39 +08:00
Momoko-Ayase 0961d23538 bump: 1.3.4 2026-11-04 20:26:17 +08:00
Momoko-Ayase b59d97c625 chore(deps): update dependencies and pin Rust 1.99.1
Upgrade zip to 9.3.0 in both lockfiles to address GHSA-m665-v7pm-7grj and refresh remaining dependencies. Align native and WASM Rust requirements and formatting.
2026-11-04 18:46:15 +08:00
Momoko-Ayase a380031567 fix(android): bound archive extraction and decoder resources 2026-11-04 13:33:38 +08:00
Momoko-Ayase 22dd92982e fix(android): bind metadata recovery to its application 2026-11-04 13:14:25 +08:00
Momoko-Ayase 303aaa6283 fix(cli): fail suspect runs with --strict-integrity 2026-11-04 12:35:22 +08:00
Momoko-Ayase 312a70b7c6 fix: scope panic suppression to individual jobs and threads 2026-11-04 12:34:41 +08:00
Momoko-Ayase db2729737f fix(windows): validate DLL layout candidates before selection 2026-11-04 12:31:21 +08:00
Momoko-Ayase 3baf986a84 fix(io): isolate concurrent atomic output writes 2026-11-04 12:28:52 +08:00
Momoko-Ayase d16f1c9394 fix(android): deduplicate only successfully restored inputs 2026-11-04 11:34:40 +08:00
Momoko-Ayase f5896b3428 fix: explain missing and mismatched companion payloads 2026-11-04 02:54:31 +08:00
Momoko-Ayase dfff21604a chore: edit AGENTS.md 2026-11-04 02:37:18 +08:00
Momoko-Ayase 31a0c4139c bump: 1.3.3 2026-10-24 21:33:59 +08:00
Momoko-Ayase ea92d26d28 fix(windows): support legacy PE32 payload layouts
Handle fully encrypted PE32 payloads and compact shell, stage, and metadata layouts. Trial-decrypt each table candidate before selecting it, restoring the header and stage ciphertext between attempts.

Add synthetic regressions for full and prefix encryption, false table candidates, rollback, metadata placement, and malformed ranges. Preserve existing corpus outputs.
2026-10-24 20:40:23 +08:00
Momoko-Ayase 5bd1b0b07d chore: bump version to 1.3.2 2026-09-27 14:12:42 +08:00
Momoko-Ayase 01fdc58d2b Remove CLAUDE.md symlink
Starting Claude Code 2.1.277 if no CLAUDE.md it will check for AGENTS.md.
2026-09-27 14:05:04 +08:00
Momoko-Ayase f7d2d8b7e1 Merge pull request #8 from y52en/chatgpt/android-runtime-restoration-v2
fix(android): restore protected IL2CPP runtime state
2026-09-27 13:54:37 +08:00
Momoko-Ayase 25939c9738 Merge PR #7: restore IL2CPP 24.1 method indices 2026-09-20 10:04:49 +08:00
Momoko-Ayase 2501aabc57 Merge PR #6: support SysV-only ELF hash tables 2026-09-20 10:04:23 +08:00
Momoko-Ayase da06b4f5fd Merge PR #5: preserve program headers when extending crowded ELFs 2026-09-20 10:03:48 +08:00
Momoko-Ayase ba380a5774 docs: point README at GitBook and restore the legal-notice heading [skip ci]
Product docs already live on crackproof-research; keep a minimal README
(usage, legal notice, license) so CI can still extract LEGAL-NOTICE.md.
2026-09-15 23:27:24 +08:00
Momoko-Ayase d6224e639c chore: bump version to 1.3.1 2026-09-10 20:58:44 +08:00
Momoko-Ayase 9b8024b132 fix(windows): re-arm neutralized TLS field relocations for PE32 DLLs
The packer demotes the four base-relocation entries covering the TLS
directory's VA fields to IMAGE_REL_BASED_ABSOLUTE padding, because its
own loader fixes TLS up by hand. Restored verbatim, a DLL mapped off its
preferred base keeps stale VAs in its TLS directory and the OS loader
faults in LdrpAllocateTlsEntry while writing the TLS slot index through
the unrelocated AddressOfIndex (observed as a 0xc0000005 startup
failure).

Walk the restored BaseReloc blocks and promote those entries back to
IMAGE_REL_BASED_HIGHLOW, gated on is_dll so EXE output stays
byte-identical.
2026-09-10 20:42:39 +08:00
Momoko-Ayase 512a627066 web: recognize Android targets and point users at the CLI
Dropping an .apk/.apks/.xapk package or a .so library reported
"not recognized — will be skipped", which reads as "not protected"
when the real gap is that the Android pipeline (filesystem
orchestration in senbei-io) has no wasm build. These files now get an
explicit android pseudo-kind at staging time: the row explains that
the CLI handles them, and they neither enable the Unpack button nor
error out mid-run.
2026-09-10 09:32:58 +08:00
Momoko-Ayase a230c37281 web: stack file-row status below the name on narrow screens
On phone-width viewports the right-aligned status column shared a flex
line with a long file name and wrapped one word per line. Below 560px
the row now wraps: name and action icons keep the first line and the
status takes a full-width line underneath.
2026-09-10 09:29:23 +08:00
Momoko-Ayase 4f59e25652 ci: declare rustfmt/clippy components in rust-toolchain.toml
The 1.98.1 pin installs without rustfmt and clippy, so the fmt and
clippy jobs fail at the shim before running. Listing the components in
the toolchain file makes rustup auto-install them on every host,
including the CI runners that invoke cargo with no setup action.
2026-09-10 09:28:50 +08:00
Momoko-Ayase cbfacbc31f Upgrade dependencies to latest stable
zip 0.6.6 -> 8.6.0 (the 0.6 line is unmaintained), aes 0.8 -> 0.9
(BlockCipherDecrypt trait replaces BlockDecrypt), sha2 0.10 -> 0.11
(Array no longer formats as hex; local hex_digest helpers). Outputs are
byte-identical across the upgrade: full golden corpus and Android corpus
sidecars all pass.
2026-09-02 03:19:06 +08:00
Momoko-Ayase d3dd1a8ff8 Merge Android (AArch64) shared-library restoration, bump to 1.2.0
Adds the Android protection-scheme pipeline: hollowed ELF64/AArch64
libraries are restored statically (stage-1/stage-2 module extraction,
container decode, dynamic-linker table rebuild), with app-package
(.apk/.apks/.xapk) container handling, cross-source content dedup, and
il2cpp metadata support for the Android variants (seeded RID permutation;
embedded XOR-wrapped blob extraction).

The single senbei CLI now routes single .so files, packages, and folders
by content; outputs follow the existing .unpack-infix naming under
<root>/unpack or --out. PE behavior is unchanged (35/35 goldens).
2026-09-02 03:09:21 +08:00
Momoko-Ayase 0c3f29f93a Split web/ into senbei-wasm crate + static assets
The Rust bindings move from web/src to a top-level senbei-wasm crate (still
outside the workspace, own Cargo.lock), matching the other senbei-* crates.
web/ keeps only the static frontend; wasm-pack emits the JS/wasm package into
web/pkg/ via --out-dir. JS glue renamed senbei_web -> senbei_wasm with the
crate.
2026-08-30 22:44:15 +08:00
Momoko-Ayase f80749ffd6 Merge bfloat16-senbei workspace restructure, bump to 1.1.0
Adopts the fork's workspace split (senbei-cli / senbei-crypto / senbei-io /
senbei-metadata / senbei-pe), its structured error taxonomy, entry-transform
and layout validation, PE32 dd8 key-formula selection with a skip floor, the
CRT entry-stub dd8 oracle, and the extensionless-file scan skip.

Kept from senbei on top of the restructure:
- ManagedExe detection/routing and the CLR (COR20 + BSJB) metadata restore
  in the EXE pipeline.
- The RET+int3 padding fingerprint as the primary dd8 padding signal, ahead
  of the mutated-position 0xCC fallback.
- docs/, .github/, samples/, tests/ (moved to senbei-cli/tests), and the
  web/ wasm frontend (rewired to the split crates), all of which the fork
  had dropped.
- The fork's README compatibility matrix is not taken: it names real games,
  which the public-repo hygiene rules forbid.
- The wasm32 localtime fallback in logfile and unpack_bytes_force_exe (the
  web app's trap-recovery entry point), both lost in the restructure.

Golden corpus: 35/35 byte-identical. clippy -D warnings clean; wasm32 check
clean for the full workspace.
2026-08-30 22:31:21 +08:00
Momoko-Ayase ef13419b93 Bump version to 1.0.1 2026-08-16 05:51:39 +08:00
Momoko-Ayase dc6e72a8bb Split the Exe kind into NativeExe / ManagedExe
The detector already used the CLR data-directory RVA to split DLLs into
NativeDll / ManagedDll; EXEs were a single undifferentiated Exe kind.
Apply the same CLR check to EXEs so callers can tell a protected .NET
executable from a native one without unpacking. Routing is unchanged:
both EXE kinds go to the EXE pipeline.

- CLI per-file lines and the run log now print NativeExe / ManagedExe
  (the kind comes from the same Debug formatting as the DLL variants).
- The web API's detect()/unpack_file() kind strings become
  'native-exe' / 'managed-exe'; the web UI gains matching labels, and
  the trap-retry guard (DLL-probe recovery) keys off both EXE kinds.

Golden corpus unchanged (35/35 byte-identical); kind is classification
only and never affects output bytes.
2026-08-16 05:47:16 +08:00
Momoko-Ayase fe4f904409 Strengthen the dd8 shift detector with a RET+int3 padding fingerprint
The selector replayed each candidate shift over three sample pages and
counted 0xCC bytes at dd8-mutated positions. That signal is biased
upward for wrong candidates (255 pseudo-random XORs manufacture ~1
spurious 0xCC per page for free) and cannot express 'this candidate
destroys real padding', so the decision leaned on a 2x-margin-plus-floor
rule tuned around the noise.

Score candidates instead by a structural fingerprint of real x64 code:
the MSVC function-end padding pattern (a 0xC3 RET followed by a run of
>= 4 0xCC bytes), summed over up to four sample pages taken with a
head/tail margin. Because dd8 touches only 255 of 4096 bytes per page,
an encrypted page keeps most runs under 'no dd8' and restores them only
under the correct shift, while an already-plaintext page loses runs
under any shift — wrong candidates score *below* the baseline, which the
old count could never say. The gate becomes a positive delta over the
baseline (floor 8) instead of the 2x margin.

When every candidate's fingerprint is silent (sampled pages with no
padded epilogues), fall back to the previous mutated-position count with
its 2x-margin-plus-floor rule, so pages without padding still resolve.

Across the 35-input golden corpus every decision now comes from the
fingerprint with wide, sign-correct margins; all outputs are unchanged
(byte-identical goldens).
2026-08-16 05:33:44 +08:00
Momoko-Ayase 7f143b3b27 Support managed (CLR) EXEs in the old-layout EXE pipeline
Managed EXE builds differ from their native counterparts in the old
layout: the encrypted import-name table pointer is null (their imports
are just the CLR bootstrap stub), the config block's entry-point field
is 0, and the COR20 header / BSJB metadata stream / CLR resources are
stored verbatim in the protected file rather than arriving through the
section-block pass.

- Skip the import-string walk when the table pointer is null instead of
  chasing header garbage as a pointer chain (previously a caught
  out-of-bounds panic reported as corrupt input).
- Keep the protected header's entry point when the config block stores
  0, instead of overwriting it with 0.
- Restore the COR20 header, BSJB metadata stream, and CLR resources
  verbatim from the protected file after the .text dd8 pass, and
  suppress the native COR20-directory clearing when the restore ran.

Validated by decompiling the unpacked managed EXEs with ilspycmd: full
assemblies (types, methods, IL bodies) decompile cleanly. Golden corpus
unchanged (35/35 byte-identical).
2026-08-16 05:33:44 +08:00
Momoko-Ayase 21cd151e15 First public commit 2026-08-09 00:08:31 +08:00