How yesdisown/e-ng works
e-ng is a Rust command-line C++ obfuscator. Its workflow reads source from a file or stdin, chooses charset- or phrase-based macro naming, tokenizes C++, assigns collision-avoiding names to eligible tokens, renders directives and obfuscated code, then writes to a file or stdout. The graph separates CLI I/O, token processing, macro generation, and output formatting. Source excerpts support the core calls; optional runtime capabilities documented in the README are included where applicable.
Main entry points: main.rs File and stream I/O · lib.rs Obfuscation coordinator · macros.rs Macro name generator · lexer.rs C++ tokenizer
Components 20
CLI and I/O
- CLI and configuration
src/main.rs - File and stream I/O
src/main.rs
C++ Processing
- Obfuscation coordinator
src/lib.rs - C++ tokenizer
src/lexer.rs - Token stream
- Token selection
src/lib.rs - Token macro mapping
src/lib.rs - Define ordering
src/lib.rs
Macro Generation
- C++ keyword set
src/macros.rs - Name mode validation
src/macros.rs - Macro name generator
src/macros.rs
Output Rendering
- Output formatter
src/formatter.rs
Other components
- User
- C++ source
- Obfuscated C++
- Phrase dictionary
- Random shuffle
- Filesystem
- stdin
- stdout
Connections 21
- User → CLI and configuration: selects options
src/main.rs - User → C++ source: provides source
README.md - CLI and configuration → File and stream I/O: reads and writes
src/main.rs - File and stream I/O → Filesystem: accesses files
src/main.rs - File and stream I/O → stdin: reads input
src/main.rs - File and stream I/O → stdout: writes output
src/main.rs - File and stream I/O → Phrase dictionary: loads phrases
src/main.rs - CLI and configuration → Name mode validation: builds naming mode
src/main.rs - File and stream I/O → Obfuscation coordinator: passes source and config
src/main.rs - Obfuscation coordinator → C++ tokenizer: tokenizes source
src/lib.rs - C++ tokenizer → Token stream: produces tokens
src/lexer.rs - Obfuscation coordinator → C++ keyword set: loads reserved words
src/lib.rs - Obfuscation coordinator → Token selection: selects eligible tokens
src/lib.rs - Token selection → Macro name generator: requests names
src/lib.rs - Name mode validation → Macro name generator: configures naming
src/lib.rs - Macro name generator → Token macro mapping: assigns macro names
src/lib.rs - Token macro mapping → Define ordering: orders definitions
src/lib.rs - Define ordering → Random shuffle: randomizes when enabled
src/lib.rs - Obfuscation coordinator → Output formatter: renders token stream
src/lib.rs - Output formatter → Obfuscated C++: produces C++ text
src/formatter.rs - File and stream I/O → Obfuscated C++: writes result
src/main.rs