ganlvtech/lua-simple-encrypt

能否分享你的解密方式,不知道密钥的情况下。

Opened this issue · 12 comments

能否分享你的解密方式,不知道密钥的情况下。

不知道密钥就穷举或者统计吧。功能不在本仓库范围内。

hey how can i use this repo... there are no instructions in README.md

@P-A-I-N

Just visit https://ganlvtech.github.io/lua-simple-encrypt/dist/index.html, select your file and then press the button. (You may need a translator)

This is a javascript tool, your lua won't be upload to any server. All things done on your own computer.

Use Lua string.dump function to dump precompiled chunk. It's lua vm bytecode. It's better than my simple encryption. There is some lua decompilers, but it's still better than simple xor.

This kind of encryption would only prevent most users from viewing your original code. Maybe you want to protect some data in a paid script from being redistributed. And it would also prevent people who don't know the password from executing the script.

But It won't prevent advanced "hackers". Even if you encrypt it by a really sophisticated and horible algorithm. Once you give them a key, they can executed the code. Who could execute the code would also avaiable for debugging the code.

The XOR encrypt is really simple. When your code's file is big enough. I can also analyse it by statistics. Because words like if, end would appears many time, it's possible to guess the encryption key. (This problem can be solve by using another algorithm.)

My conclusion is just let those who don't know about lua and the beginners don't debugging keep away from your original data.

It's really easy for me to write a decryptor for my program only if i got your key. When you don't have the key. XOR encrypt is also a little hard.

ya...its true encryption is for protection....but can i make a encryption by my own ( for lua) btw im not a newbie in lua i make lua scripts for online games...like revo makes encryption for his own...can u teach me ?

In my opinion, if you could modify the lua engine., changing bytecode of the lua VM is a good way. it can prevent anonymous lua engine and decompiler.

There are two ways to make your own encryption. First is encode and decode. The second is break lua code into pieces, implement another vm in lua. I don't think there is an exact way to make your own protection. You just transform the code, making it unreadable but don't change the things you do.

Maybe he just find some bug of unluac. It's true that unluac has bug, some opcodes will cause it enter an infinite loop. Not only for Revo's, a simple code may also.

I'm recently try to find a way to decompile his encrypted code. (but i don't have enough time to write decompiler)