[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: obfuscating / protecting LUA code
- From: "Andy Stark" <astark@...>
- Date: Fri, 28 Apr 2006 14:06:08 +0100
Lua list <lua@bazar2.conectiva.com.br> on at wrote:
>You could reorder the VM instructions in lopcodes.h, but then you need
>to fix lopcodes.c.
The lopcodes.h and lopcodes.c source files are quite short and have a
fairly simple structure. Perhaps a future distribution of Lua could
include a Lua script that generates these two files and has an option to
permute the order of opcodes using a seed specified by the user. For
simplicity you could use
(standardOpcodeNumber * primeNumber) % numberOfOpcodes
but some kind of seeded pseudo-random ordering would be more secure.
Having the opcode information in a Lua table in the script might be useful
for other purposes too, for documentation or writing disassemblers, etc.
&.
PS - standard pre-generated versions of lopcodes.h and lopcodes.c should
still be supplied with Lua - the script should just be an extra tool for
those who need it.
#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared
by NetIQ MailMarshal.
The Blackpool Sixth Form College.
#####################################################################################