How amoxicillinmediatek/lexify works
Lexify is a Rust Lua source obfuscator, exposed as a CLI and a browser demo. The principal workflow validates Lua, tokenizes it, applies configured transformations, formats the result, and returns or emits the transformed source. The graph preserves the documented transformation families and the browser/WASM branch. Some pass wiring is supported by the lib.rs source-index references rather than a complete excerpt; the web README’s CLI description and the sampled UI’s WASM loader differ, so the browser path follows the sampled implementation.
Main entry points: lib.rs Obfuscation pipeline · main.rs Rust CLI · Obfuscator.tsx Web playground · parser.rs Lua validation
Components 20
User Interfaces
- Rust CLI
src/main.rs - Web playground
web/app/ui/Obfuscator.tsx - WASM bridge
src/lib.rs
Obfuscation Core
- Pass options
src/config.rs - Obfuscation pipeline
src/lib.rs - Lua validation
src/parser.rs - Token scanner
src/lexer.rs
Transformation Passes
- Local renaming
src/renamer.rs - String encoding
src/string_encrypt.rs - String splitting
src/string_splitter.rs - Number obfuscation
src/number_obfuscator.rs - Boolean obfuscation
src/boolean_obfuscator.rs - Table obfuscation
src/table_obfuscator.rs - Condition normalization
src/control_flow.rs - Dead-code insertion
src/dead_code.rs - VM lowering
src/vm.rs
Output Safeguards
- Minifying formatter
src/formatter.rs - Chunk wrapper
src/wrapper.rs - Integrity guard
src/antitamper.rs
Other components
- Lua author
Connections 21
- Lua author → Rust CLI: provides Lua
README.md - Lua author → Web playground: edits source
web/app/ui/Obfuscator.tsx - Rust CLI → Obfuscation pipeline: invokes
README.md - Web playground → WASM bridge: loads module
web/app/ui/Obfuscator.tsx - WASM bridge → Obfuscation pipeline: obfuscates source
src/lib.rs - Pass options → Obfuscation pipeline: configures passes
src/lib.rs - Obfuscation pipeline → Lua validation: validates input
src/lib.rs - Lua validation → Token scanner: tokenizes validated source
src/parser.rs - Obfuscation pipeline → Token scanner: lexes source
src/lib.rs - Obfuscation pipeline → Local renaming: applies pass
src/lib.rs - Obfuscation pipeline → String encoding: applies pass
src/lib.rs - Obfuscation pipeline → String splitting: applies pass
src/lib.rs - Obfuscation pipeline → Number obfuscation: applies pass
src/lib.rs - Obfuscation pipeline → Boolean obfuscation: applies pass
src/lib.rs - Obfuscation pipeline → Table obfuscation: applies pass
src/lib.rs - Obfuscation pipeline → Condition normalization: applies pass
src/lib.rs - Obfuscation pipeline → Dead-code insertion: applies pass
src/lib.rs - Obfuscation pipeline → VM lowering: applies pass
src/lib.rs - Obfuscation pipeline → Minifying formatter: formats output
src/lib.rs - Obfuscation pipeline → Chunk wrapper: wraps output
src/lib.rs - Obfuscation pipeline → Integrity guard: guards output
src/lib.rs