Forum

> > CS2D > Scripts > Anti DeCompiler
Forums overviewCS2D overview Scripts overviewLog in to reply

English Anti DeCompiler

12 replies
To the start Previous 1 Next To the start

old Re: Anti DeCompiler

sheeL
User Playing CS2D

Quote
Thanks @user Apache uwu:
Have any website for test if it really works?

--

1
2
3
4
5
6
7
8
9
10
11
LuaQ  
   @flasher.lua           J   
  J     Á@  b@ Š  Á   A  ¢@ Ê  
 A  A  "A J Š Á  B  ¢A Ê   AB  âA 
 A  B  "B J Š Á  C  ¢B Ê   AC  âB 
 A  C  "C J€ Š€ Ê€ 
 A  D  "D âC€ ¢C€ bC€ bB bA Š Á  B  ¢A Ê   AB  âA â@ 
 A  A  "A "@    E€  À  Á  \@€d   G   €          ð?       @   addhook    projectile    projectileHook           	     
    À  €…@  À     œ€€Å@     AÁ  Ü€€ AA €  Á UÁA Á A  ÁA    AB € ÁB  €ÕƒA  € 
         J@   player    x    y    parse    setpos      0 0    timer                                                  R]B\H`8ì€FnT)ú|hMI=I”lnmlsTÜ1>}L)ä|hMJ=IŠlnmlmd9ì=,M|ÔLF}d
,y¤\·UJñ¤  ð~  ÝLí›*ík´ŽI‡ìµ¬Ÿ'ÉÀ1N‡¢.Ç<©…|jã¿ÖÕ<x§ÑŸ²HM+D÷O2E=?Hbf

Here is the file for who try help me

old Re: Anti DeCompiler

aleksix
User Off Offline

Quote
Lua is a scripting language, so all scripts are just text files and they are parsed at run-time. How are you supposed to "compile" or "de-compile" plain text? Even better, do you think that those weird "compiled" text files will be useable for script engines?

old Re: Anti DeCompiler

Apache uwu
User Off Offline

Quote
@user ohaz: A quick test with the following code:

1
2
3
4
5
addhook("join", "_join")

function _join(id)
    msg("Player "..player(id, "name").." has joined the server.")
end

Yields:

1
2
3
4
addhook("join", "purgq")
function purgq(uc)
msg("Player "..player(uc, "name").." has joined the server.")
end

Which isn't much obfuscation...

Either changing it to bytecode or even purposely re-factoring the code could be an option if you want to take another step to protect your code.

old Re: Anti DeCompiler

cortz
Super User Off Offline

Quote
It helps with huge scripts and non-commented code and from people that are just trying to modify simple stuff.

old Re: Anti DeCompiler

DC
Admin Off Offline

Quote
Why do you want to do that anyway?

Lua scripts are not sent to clients when using them in CS2D because only the server needs them. So the best solution to keep your scripts protected is to keep them secret. Just don't share them.

old Re: Anti DeCompiler

Flacko
User Off Offline

Quote
I can't think of a good way to "decompile" the LuaVM instructions you can find in those compiled Lua files into a readable script.

The compiler does a significant job on optimizing the resulting instructions.

Even if you could achieve such a thing I doubt your script will be any easier to read than the raw instructions themselves.

For more information you could read this document:
http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf

old Re: Anti DeCompiler

gotya2
GAME BANNED Off Offline

Quote
You could take a lua file and encrypt all the content of the lua file into a string.

Then at runtime, decrypt the string, and pass it to
loadstring.
http://www.gammon.com.au/scripts/doc.php?lua=loadstring

This will stop inexperienced people from modifying your script.

Also, you could compile it to lua bytecode and only share the compiled script. It's however very easy to decompile, using tools available on the net.
The best "anti decompile" I can come up with is a combination of the two before mentioned methods.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview