- feat(cli): Apply obfuscation, encoding, and safe options in main loop
- feat(obfuscation): Allow disabling garbage instruction generation via obfuscation limit
- fix(encoder): Correct schema size calculation for x64 architecture
- fix(encoder): Pad encoded payload with NOPs to ensure schema alignment
- fix(obfuscation): Add fallback for random register selection in garbage generation
- fix(cli): Truncate output file on write and ensure it is closed
- fix(examples): Correct casing in sgn package import path
- style(encoder): Remove trailing whitespace from register save definitions
This commit also optimizes bad-byte checking and improves code style.
- fix(main): Correct payload selection logic for ASCII and bad byte constraints
- refactor(main): Improve readability of payload selection conditions
- fix(sgn): Correct register definitions for ESI, EDI, and RDI
- fix(sgn): Remove PUSH/POP of RSP from x64 register save/restore opcodes
- fix(sgn): Rework random register selection to prevent returning invalid registers
- perf(utils): Optimize `ContainsBytes` by using `bytes.IndexByte`
- style(utils): Export `ContainsBytes` function
- chore(main): Remove unused `bytes` import
- fix(encode): Remove redundant modulo operations from ADD/SUB ciphers
- fix(obfuscate): Remove "JMP 2" from the list of safe garbage instructions
- fix(obfuscate): Use correct slice length when selecting random garbage instruction
- fix(sgn): Correct register exclusion logic in GetSafeRandomRegister
- test: Add integration stress test for payload execution on Windows
- Register preserving related bugs fixed
- Safe random register selection related bugs fixed
- Done major code refactoring
- New parameter parsing module added
- Command line parameters updated
- Example code updated
Previously passed by value, preventing the architecture being set
on the original Encoder object. This caused all output to be 32-bit.
Fixing this revealed that the function prologue/epilogue garbage
mnemonic pattern does not compile if architecture is set to 64, so
commented that out.