SRL Archive - OSR Help

Possible to make parts of script private?


Jordan155

2012-04-17 06:05:26

Hey guys.

So I created my first script and I was just wondering if it was possible to make some of the procedures and functions private so that if someone else opened it they could still use all of the contents inside of it, but would not be able to see the code itself?

Might seem like a weird request but I assure you I have my reasons and they are all in the best intention.

So for a procedure or function block when I can minimize it, is it possible to keep it private so if someone tried to expand it, it simply would not open?

Thanks

Main

2012-04-17 06:11:45

others have suggested making some functions .dll but i have no idea how that works or the visibility of it.

Jordan155

2012-04-17 11:03:04

Anyone know if this is possible and if making the functions .dll will change anything?

Markus

2012-04-17 11:11:19

Short but true answer: not possible.

m34tcode

2012-04-17 11:11:53

if you include your functions in a dll, and load the dll in the script, noone will see the functions. You could also obfuscate

to load a dll: {.loadlib libPathHere}

as for preventing viewing, it is not completely possible. you can hinder people, but the code MUST be on your computer for it to be executed, therefore a smart user(pretty general here at SRL) will be able to see your code no matted what. obfuscated code and be de-obbed and compiled dlls can be decompiled and reverse engineered.

Jordan155

2012-04-17 11:16:52

Alright, completely understandable and that was what I had assumed.

Thanks for the quick replies guys!

weequ

2012-04-17 11:20:27

From: m34tcode
if you include your functions in a dll, and load the dll in the script, noone will see the functions. You could also obfuscate

to load a dll: {.loadlib libPathHere}

as for preventing viewing, it is not completely possible. you can hinder people, but the code MUST be on your computer for it to be executed, therefore a smart user(pretty general here at SRL) will be able to see your code no matted what. obfuscated code and be de-obbed and compiled dlls can be decompiled and reverse engineered.
Doesn't must be on your computer if you execute it on a server. For example the client script sends some information to the server -> Server does the math and tells the client script what to do.

Er1k

2012-04-17 11:21:29

Using dlls effectively means that only the people having your DLL will be able to call certain functions, unless they reverse engineer it. It's a nice try, but there's no practical use unless what you do is computationally intensive and using precompiled code will give a significant speedup.

I did that once before. It's fun, but everytime you need to update some code you'll have to recompile the dll, which is not the thing you want to do often :P

m34tcode

2012-04-17 12:50:31

True, i have never actually used a dll for simba before =\