So, I want to obfuscate my lua code. I search for lua obfuscators on google and this site comes http://www.capprime.com/CapprimeLuaObfuscator/CapprimeLuaObfuscator.aspx. Also, I've seen many other site mention it too as a good obfuscator. But when I copy and paste my code to see that... the exact same code is generated. Why is that so? You can also test this by giving a sample input, that same output is generated. Are any good obfuscators around behind this? Thanks
As far as i know there are no obfuscators for Lua due to the fact that Lua allows you to implement your own obfuscator. Please read the C api of Lua and there you have ways of implementing your own file reader for lua files. By using that approach you can obfuscate/encrypt/decrypt on load of the file.
Related
I wanna try to make a ".exe" file using lua code.
I've tried lua.org but i don't understand anything about it.
i've followed tutorials but they all don't help.
It would help me alot if there was a setup file that does all the setup and
lets me able to make .lua files.
Thank you for trying to help!
There's nothing built in to Lua that will let you do this, so you need to either write some C code yourself or use a third-party tool. If you want to go the third-party route, https://github.com/PG1003/dogfood is an example of such a tool.
A bit of a general question, but what is the most popular/common/easiest way of creating a custom pcore?
I have seen some examples and they were mostly done on Matlab and since I do not have Matlab anywhere, I am a bit lost here. There has got to be a proper way of doing without it!
Thank you in advance!!!
You can create it with VHDL or Verilog languages, but after that you need to make few files like .mdp and .pao, create directory move all the files there and then put the directory to a library.
Detailed information you can find in Xilinx Manual
Does anyone has code examples reading hdf5 files in F#? I cannot find any examples on SO or google. I tried hdf5.net library but could not get it to work using Python example code.
While I haven't tried it, there is some sample code available at https://rodhern.wordpress.com/2013/02/17/hdf5-f-to-octave-example/
It's the only example I know of offhand.
I've been trying to load a library into lua file. Sparing the details, as they are not really important, I have tried this many ways.
The final way, and the one I believe to be correct although I still can't get it to work, is to use "package.loadlib". See code:
ed = package.loadlib("Encode_Decode.lua", "luaopen_ed")
print(ed)
But when I run the program I get this error:
Encode_Decode.lua is either not designed to run on Windows or it
contains an error. Try installing the program again using the original
installation media or contact your system administrator or the
software vendor for support.
I know the program runs because I used it internally to test it's encoding and decoding abilities and it worked fine. I'd really prefer not moving the contents of the library over as my main lua file is crowded as it is. I will if I have to though.
Yes it is in the main folder. I've also tried changing the extension of the library file into a .dll, with the same error.
What am I doing wrong?
I apologize in advance if this is a duplicate, I did my best to research this problem as thoroughly as I could. But to be honest it's almost 3 AM and I've been searching for almost an hour.
Stupid beginner mistake, used the wrong syntax.
require("Encode_Decode")
print(dec("bnVs")) --returns "nul"
package.loadlib is used for loading shared libraries; i.e. .dll or .so files. You're passing a .lua file to it, so Windows attempts to load it as a .dll and fails when it can't.
To load Lua source code, you can use dofile. Alternatively, you can use require, which is a bit more complex, but handles loading modules only once and works with both Lua and C modules.
I am developing a lua library for Corona which contains code spread across files. I am using luac to generate a single bytecode file which I can share with other developers so that they can use my library easily and without looking at code. Problem is that I am getting "bad header in precompiled chunk" error. From searching around, I find that its because I need to compile for ARM.
What would be right approach for me here?
Lua bytecode is not portable neither across version, nor across platforms; see luac docs.
Update
If you are just trying to pack some files together you could see Squish.
If you need a real deploying system for Lua there is Luarocks.