A register-pointer JavaScript virtual machine written in JavaScript.
Create index.js in the src directory, then run ./build.sh with the repository directory as your current working directory.
Run ./run.sh with the repository directory as your current working directory.
- Compile almost any JavaScript source to obfuscated virtual machine code
- Dynamic instruction set, randomized output bytecode
- ES5 compatible output for ES6+ input
- Modules, imports, exports
- Templates (w/o Babel)
- Internal async functions
- Spread elements (w/o Babel)
- Do expressions
- With statements
- Decorators
- Directives
- Function generators
- Catch external exceptions internally
- Bundling of client sources pre-compilation
- Conditional sets
- Run minifier more
- Instruction repackaging, shuffling, modification/generation
- VM internals repackaging
- Metamorphic bytecode -- copy in code, alternate decryptions, etc
- Bytecode scheduler/internal async functions
- Hide instructions via mov and call register
- Replace
jz/jnzwithadd r0 X r0withX = r0 + !!condition * off - Replace
subwithadd r0 X r2withX = div r1 -1 - Replace
eq_typedwitheq+typeof - Internal negation of Numbers
- Compiler-client register mapped shuffling
- Code signing and internal verification
- Tamper detection - block by block - chained
- Code flow graph flattening
- Use register pointing capability
- Internal offset assertions
- Compile-time hotspotting
- Global value numbering
- Dead code elimination
- Register reduction
- Instructions as arguments
- Track register state across time rather than live scanning only in optfuscator
- Inbuilt profiling
- Remove typed arrays dependency
The compiler converts JavaScript code into svm assembler. There is no optimization, and this is only intended to convert the semantics of JavaScript to svm assembler.
The optfuscator, or optimizing obfuscator, optimizes and obfuscates svm assembler (but not svm bytecode).
The assembler compiles svm assembler into svm bytecode, and encrypts it. It is planned to output a minimal, obfuscated, and web-compatible client.
The client runs the svm bytecode.