0

When I try to open a lua file in VScode. Gives an error message

The file is not displayed in the editor because it is either binary or uses an unsupported text encoding

There is no error when opening notepad++. Strings mixed with special characters

enter image description here

KordDEM
  • 177
  • 10

1 Answers1

1

That file is compiled LuaJIT bytecode, not Lua source code. The first three bytes being ESCLJ are the indication of this.

  • Ooh, I thought lua was a scripting language. Is there any way to decompile the code? – KordDEM Dec 30 '22 at 07:08
  • @KordDEM Lua is a scripting language. Some scripting languages just happen to have compiled files too (Python is another). Where exactly did you get this code? If it was part of the official OpenWRT, you'd have an easier time finding the original source rather than trying to reconstruct it by decompiling this. – Joseph Sible-Reinstate Monica Dec 30 '22 at 08:04
  • Thanks for the help. The problem is that the OpenWrt source code is lost. I'm trying to save at least that part in Lua using Lucy to process incoming POST requests from the router's web interface. – KordDEM Dec 30 '22 at 11:15
  • @KordDEM - Yes, LuaJIT decompilers exist. – ESkri Dec 30 '22 at 13:41
  • @ESkri, Thank you. Perhaps you could recommend a couple of good decompilers? – KordDEM Dec 30 '22 at 17:21