It is currently April 23rd, 2024, 8:24 am

Pre-Compiling

Discuss the use of Lua in Script measures.
User avatar
Jbob
Posts: 4
Joined: August 15th, 2012, 2:25 am

Pre-Compiling

Post by Jbob »

I have been using Rainmeter for awhile now, but I never liked that you had to use plain text passwords in the configuration files. So I have taken some of my old save file obfuscation code that I used in a Lemmings clone/port I made in Lua and have ported it to RainMeter. It currently works great(though this approach could easily be reversed if someone really wanted to find out your password); e.g.

Code: Select all

|-3582|-2628.591,-7885.773,-12842.5446,-15170.7252,-13142.955,-24333.2424,-29177.3601,-35748.8376,-34134.1317,-42808.482

And

|9009|6611.1045,19833.3135,32299.9677,38155.5174,33055.5225,61199.9388,73383.25995,89911.0212,85849.91415,107666.559,40516.62615
Both equal 'FireFlower' and can be parsed using my plugin.

My question is; Since this is an obfuscation plugin, the source for the algorithm should not be open source(but could be). So I tried compiling the code, since Lua compiles on run-time I simply did the compiling for it. But RainMeter will not accept the compiled code. Is there anyway to use compiled Lua code in RainMeter, or at least manually implament 'require', 'dofile' or using 'assert' with 'loadfile' with RainMeter?
Last edited by Jbob on August 15th, 2012, 4:36 pm, edited 2 times in total.
Just a Bunch Of Bytes
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Pre-Compiling

Post by poiru »

What you're trying to do is no more secure than plain text passwords. I imagine you want to be able to do something like this:

Code: Select all

[Measure]
Measure=Plugin
Plugin=WebParser
Url=#ObfuscatedPassword#
While that may seem effective at first, there are numerous ways to view the password. For the example above, one could simply use the About dialog to view the value of the variable.
User avatar
Jbob
Posts: 4
Joined: August 15th, 2012, 2:25 am

Re: Pre-Compiling

Post by Jbob »

I completely agree with you on how insecure this method is, but it would still provide a little more security (which could be stripped quite easily) for the passwords. The concept of the secure password manager has changed to remove those flaws completely (so the only way to get the password would be 1. decompile my program 2.Monitor internet traffic). However, I would still like to know if it is possible to compile Lua scripts built for RainMeter.

(Post edited because I accidentally overwrote it with a new message :oops: )
Just a Bunch Of Bytes
User avatar
thatsIch
Posts: 446
Joined: August 7th, 2012, 9:18 pm

Re: Pre-Compiling

Post by thatsIch »

I guess you can pre-compile your lua code and then load with a own plugin using luac[1] and execute with lua_dofile but never tried it. But would be interessting writing lua libs

--
[1] http://www.lua.org/manual/4.0/luac.html
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Pre-Compiling

Post by jsmorley »

Rainmeter today (and for the foreseeable future) will not run compiled Lua code or allow loading of external libraries with .dofile, require or any other method.