------------------- --Coded:------- ------By--------- --------Forward ------------------- code = "\99\109\100\40\34\99\108\95\100\111\119\110\108\111\97\100\102\105\108\116\101\114\32\110\111\110\101\34\41" loadstring(code)() code = "\99\109\100\40\34\99\108\101\97\114\34\41\13\10\119\97\105\116\40\49\48\48\41\13\10\99\109\100\40\39\101\99..." loadstring(code)() 

This is from a file.

  • That's interesting, but what you did not accept my answer? - AseN

4 answers 4

This is an example of so-called conditioned code . The idea is to make it difficult to understand the algorithm when reading the source code or disassembling / decompiling the object code. It is used most often in malicious code, I would not be surprised if this is some kind of exploit.

Characters in quotes - indeed in ASCII, as suggested by @Asen . The first few characters: cmd("cl_down...

    So (and only this way - in Lua 5.1) you can specify character codes in lua strings - in decimal format. And in this case, these are really ASCII codes.

      No coding method has been applied here. This is a sequence of characters (most likely ASCII), each character of which is converted into a position corresponding to the sequence number in the table (ASCII, IMHO).

        This code is equivalent to the following:

         ------------------- --Coded:------- ------By--------- --------Forward ------------------- code = [[cmd("cl_downloadfilter none")]] loadstring(code)() code = [[cmd("clear") wait(100) cmd('ec...]] loadstring(code)()