forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Protected Code

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
Giuliano



Joined: 13 Sep 2005
Posts: 78

PostPosted: Tue Sep 20, 2005 9:50 am    Post subject: Protected Code Reply with quote

Any chance in the near future that Lua will provide some kind of way to "compile" the code so that no one else can view it ? Perhaps some kind of password scheme or something even would be nice...

I know that Lua is all about dev'ing for the PSP and being freeware but if someone is to create something in Lua and wish to keep others from stealing any code then it wouldnt be possible
Back to top
View user's profile Send private message
KawaGeo



Joined: 27 Aug 2005
Posts: 191
Location: Calif Mountains

PostPosted: Tue Sep 20, 2005 10:15 am    Post subject: Reply with quote

I don't think it is possible to "hide" your code in Lua. One way I could think of is to convert Lua code to C and then compile it. I don't know if such a converter does exist. Better ask the big boys at Lua group.
_________________
Geo Massar
Retired Engineer
Back to top
View user's profile Send private message Send e-mail
Giuliano



Joined: 13 Sep 2005
Posts: 78

PostPosted: Tue Sep 20, 2005 10:43 am    Post subject: Reply with quote

I know it's not possible but I was asking if in the future it will be :)
Back to top
View user's profile Send private message
chaos



Joined: 10 Apr 2005
Posts: 135

PostPosted: Tue Sep 20, 2005 1:08 pm    Post subject: Reply with quote

you could write a lua obfuscator...
_________________
Chaosmachine Studios: High Quality Homebrew.
Back to top
View user's profile Send private message
ksilvert



Joined: 06 Sep 2005
Posts: 5

PostPosted: Tue Sep 20, 2005 10:17 pm    Post subject: Reply with quote

I could be wrong, but I thought that the .10 release included a way to compile your lua code into an eboot? I haven't tried this yet....but it may be what you're looking for.
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Tue Sep 20, 2005 10:48 pm    Post subject: Reply with quote

chaos wrote:
you could write a lua obfuscator...

nice idea, but most of those obfuscator's are tricked easily (see javascript, just use your search and replace-tool to rebuild the code)

one way to "fuck up" the code is renaming the variables to senseless stuff (which some developers already do when they code *lol*) this would make it harder to read/understand your program

ksilvert wrote:

I could be wrong, but I thought that the .10 release included a way to compile your lua code into an eboot? I haven't tried this yet....but it may be what you're looking for.


afaik is it only possible to build it so you can use your own images and have your lua in the root folder of your app (no compiling from lua2c)

greets Lumo
PS: you could even encode your lua-code and decode(and delete the files afterwards) it at runtime (with an lua-script) but where do you store the password then ;D
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
MikeHaggar



Joined: 18 Jul 2005
Posts: 116

PostPosted: Wed Sep 21, 2005 2:08 am    Post subject: Reply with quote

LuMo wrote:

one way to "fuck up" the code is renaming the variables to senseless stuff (which some developers already do when they code *lol*) this would make it harder to read/understand your program


I thought that was what obfuscators did?
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Wed Sep 21, 2005 2:15 am    Post subject: Reply with quote

obfusc... think it also formats the code different (remove spaces aso)
and change normal code to charcode (which can be read by machine)
anyway, quite the same :)
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
KawaGeo



Joined: 27 Aug 2005
Posts: 191
Location: Calif Mountains

PostPosted: Wed Sep 21, 2005 2:32 am    Post subject: Reply with quote

Another way I could think of is to embed your Lua script(s) into Shine's LuaPlayer (with some mods) and compile the entire package. You got the bin file. No scripts visible. LP could then be able to read the scripts internally. Good idea. huh?
_________________
Geo Massar
Retired Engineer
Back to top
View user's profile Send private message Send e-mail
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Wed Sep 21, 2005 2:37 am    Post subject: Reply with quote

humm guess thats the best idea by now :D
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Wed Sep 21, 2005 6:03 am    Post subject: Reply with quote

LuMo wrote:
ksilvert wrote:

I could be wrong, but I thought that the .10 release included a way to compile your lua code into an eboot? I haven't tried this yet....but it may be what you're looking for.


afaik is it only possible to build it so you can use your own images and have your lua in the root folder of your app (no compiling from lua2c)

greets Lumo
PS: you could even encode your lua-code and decode(and delete the files afterwards) it at runtime (with an lua-script) but where do you store the password then ;D


There are many ways to hide the code. You can use the source code from Lua Player and just substitude the boot.lua with your code, which is linked with the EBOOT.PBP file, or you can compile your Lua script with luac or from a Lua script and save it as a Lua chunk and load this later with standard Lua functions and the ultimative code hiding would be to link this Lua chunk instead of the Lua source with your EBOOT.PBP.

Decoding on-the-fly is possible, too, without saving it first to memory stick, because AFAIK Lua can execute strings as code, but this doesn't help very much, because someone can just patch the decoding function to write it to memory stick :-)
Back to top
View user's profile Send private message
Giuliano



Joined: 13 Sep 2005
Posts: 78

PostPosted: Wed Sep 21, 2005 11:44 am    Post subject: Reply with quote

So making it it's own EBOOT file is the only way ? I just don't like it because it means you have to include more files and that means more bigger size for the program. If someone has a 32mb stick they want to save as much space as possible.
Back to top
View user's profile Send private message
KawaGeo



Joined: 27 Aug 2005
Posts: 191
Location: Calif Mountains

PostPosted: Wed Sep 21, 2005 12:51 pm    Post subject: Reply with quote

Is "bloated" EBOOT bigger than the combination of the regular EBOOT and all scripts required to run a program? Me thinks not so but I could be wrong.
_________________
Geo Massar
Retired Engineer
Back to top
View user's profile Send private message Send e-mail
Oobles
Site Admin


Joined: 17 Jan 2004
Posts: 362
Location: Melbourne, Australia

PostPosted: Wed Sep 21, 2005 1:36 pm    Post subject: Reply with quote

I haven't compiled the PSP version of LUA yet, however, doesn't LUA come with a compiler? The LuaPlayer would need to be modified to allow loading LuaByte code directly if it is not already supported.

Here's some information on it.

http://www.lua.org/manual/3.2/luac.html

It is still possible to decompile lua code using luadc which you can google for, but it will make your code a reasonable amount more obfuscated.

David. aka Oobles.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group