feature: symbol map reuse for consistent re-obfuscation (#26) - #96
Merged
mcpolo99 merged 2 commits intoJul 4, 2026
Merged
Conversation
added 2 commits
July 4, 2026 16:13
Implements InputSymbolMap (upstream mkaring#168 / yck1509#680) so re-obfuscation produces the same obfuscated names across builds — needed to patch already-deployed obfuscated assemblies without replacing every module. - ConfuserProject gains an inputSymbolMap attribute (Save/Load/Clone + XSD). - NameService loads that map on construction and pre-populates the name maps, so the existing reuse path in ObfuscateName returns the previous obfuscated name for any original that appears in the map. Missing files / parse errors log a warning and fall back to fresh names. - When an input map is in use, names for all rename modes are recorded (not just Decodable/Sequential), so the exported symbols.map stays complete and chainable. - CLI --map flag sets InputSymbolMap for non-project runs. Behaviour is unchanged when no map is supplied (hasInputMap gates all new paths). Test: obfuscate twice with DIFFERENT seeds — with the input map the names match, and a no-map control with the same second seed produces different names, proving reuse is what causes the consistency. Existing renamer tests unaffected.
Completes the #26 GUI follow-up. The project's Advanced Settings dialog now has an 'Input Symbol Map' field (text box with file drag-drop + a browse button) bound to ProjectVM.InputSymbolMap, so users can select a previous symbols.map from the GUI for consistent re-obfuscation. Round-trips through the existing project save/load.
mcpolo99
deleted the
26-symbol-map-reuse-for-consistent-re-obfuscation-upstream-168
branch
July 4, 2026 14:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements
InputSymbolMap(upstream mkaring#168 / yck1509#680) — feed a previous run'ssymbols.mapback in so re-obfuscation produces the same obfuscated names across builds. This lets you patch already-deployed obfuscated software without replacing every assembly.Fixes #26
How it works
The renamer already reuses a name if the original is in
_originalToObfuscatedNameMap. This PR pre-populates that map from a previoussymbols.map:ConfuserProjectgains aninputSymbolMapattribute (Save/Load/Clone + XSD schema entry — Load validates against the XSD).NameServiceloads the map on construction (path relative to the project base dir). Missing file / parse errors log a warning and fall back to fresh names — never crash.symbols.mapstays complete and chainable across successive builds.Surfaces
--map=<file>flag.<project ... inputSymbolMap="previous/symbols.map">.Backward compatible — with no map supplied,
hasInputMapis false and every new path is skipped, so existing behaviour is unchanged.Test
SymbolMapReuse.Testobfuscates the sample twice with different seeds:This proves reuse is what causes the consistency. Existing renamer tests (MessageDeobfuscation, MethodOverloading) still green; full solution + GUI build clean.