4

Good morning, I'm trying to decipher a code of Moon bytecode, but i can not in any way, does anyone could help me with this?

I have this, example:

code = '\27\76\117\97\81\0\1\4\4\4\8\0\'

How I decrypt this bytecode to text?

I already search here: http://www.asciitable.com/ But find result, because some of it does not exist in the table

Please help me with this...

I'm trying to several days and nothing

Yu Hao
  • 119,891
  • 44
  • 235
  • 294
Bruno
  • 161
  • 1
  • 1
  • 9
  • Related to http://stackoverflow.com/questions/17915486/how-to-encrypt-lua-codes. – lhf Jan 09 '14 at 13:16

4 Answers4

8

This seems to be bytecode for Lua 5.1. It is not encrypted cryptographically and be easily read with luac -l -p (not in source form but in VM instructions, which are probably enough to reconstruct the source). If you want to reconstruct the source, try LuaDec for Lua 5.1.

lhf
  • 70,581
  • 9
  • 108
  • 149
4
have this, example:
code = '\27\76\117\97\81\0\1\4\4\4\8\0\'
How I decrypt this bytecode to text?

The sequence above is what Lua bytecode looks like, if the first character '\27' tells lua that the file is bytecode or text. The sequence is \27 followed by Lua '\76\117\97' followed by \81 which tells that this is a Lua 5.1 bytecode, etc. for details have a look at this link http://howto.oz-apps.com/2012/04/delve-deeper-into-lua-and-compilation.html

A very good resource can be found at http://chunkspy.luaforge.net/ and a wonderful detailed PDF from Kein Hong Man

1

Like others have said, you can use LuaDec for Lua 5.1 but what I would do, for bytecodes like this, is use this number extractor, getting all the numbers only, then using this numbers to utf8 converter and paste them there. It may look like random words at first, but you need to align them in 1 single line, but make a space every time you go back a line, like this.

27 76 117 97 81 0 1 4 4 4 8 0

and NOT like this.

27
76
117
97
81

etc, and you should get the answer, but this might not work on different bytecodes, but this is pretty much just the manual way, It's better to use LuaDec for Lua 5.1, however if you still wanna try this, you will not get the exact source string, and if you do then good job, but that would be very bad encryption.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
-4

You can't turn bytecode into text. It's not text but instructions to the Lua interpreter.

dunc123
  • 2,595
  • 1
  • 11
  • 11
  • 2
    This answer basically disallows disassemblers and decompilers to exist. The exact source will probably not be generated, but this answer is too general. Hex is even text... – Maarten Bodewes Jan 09 '14 at 12:47