SOTR_OBFUSCATED
Type:boolean
Returns true if the current script is obfuscated, and false otherwise. Useful for toggling debug behavior or hiding sensitive logic paths in plain builds.
true when obfuscation is active, false when running unprotected.SOTR_LINE
Type:number
Expands to the current source line number at the point of use. Helpful for logging, error reporting, and runtime diagnostics without relying on debug.traceback.
The line number in the source file where the macro is referenced.
SOTR_KILL
Type:() → never
Immediately crashes the Lua VM. Use this as a hard tripwire — placing it behind anti-tamper checks, license validation, or integrity guards ensures the process cannot continue if the condition is violated.
Calling this function crashes the VM immediately with no recovery.
SOTR_GUID
Type:string
Expands to a random hex string generated once at obfuscation time. Every obfuscation run produces a different value, but all uses of SOTR_GUID within the same run expand to the same string. Useful for unique script instance identification or anti-leak fingerprinting.
A random hex identifier baked in at obfuscation time, consistent across the entire script.
SOTR_TIMESTAMP
Type:number
Expands to the Unix timestamp of when the script was obfuscated. Useful for expiry logic, build tracking, or logging when a particular build was generated.
The Unix timestamp at the moment obfuscation was run.
SOTR_VERSION
Type:string
Expands to the current Soteria obfuscator version string at the time of obfuscation. Useful for debugging, watermarking, or asserting a minimum obfuscator version at runtime.
The Soteria version string, e.g.
"v1.0.0".SOTR_ENC_STR
Type:(string) → string
Encrypts a string constant at compile-time and inserts the decryption logic inline. The plaintext value is never present in the compiled output — only the encrypted form and its corresponding decryptor are embedded. Decryption happens transparently at runtime when the value is first accessed.
Accepts a string literal and returns the decrypted string at runtime. The original value is not present in the bytecode.
SOTR_ENC_NUM
Type:(number) → number
Encrypts a numeric constant at compile-time. Like SOTR_ENC_STR, the original value is replaced with an encrypted representation in the compiled output and decrypted transparently at runtime. Useful for obscuring license codes, version checks, or magic constants.
Accepts a number literal and returns the decrypted number at runtime. The original value is not present in the bytecode.
SOTR_EXPOSE
Type:(function) → function
Wraps a function to exclude it from virtualization. The wrapped function is compiled normally and executes at native speed, bypassing the Soteria VM layer entirely. Use this for hot paths where virtualization overhead is unacceptable.
Accepts a function and returns it unvirtualized. The returned function executes outside the Soteria VM at native speed.
