# How can i be able to lock up my script



## geolito (May 26, 2015)

HOW CAN I LOCK MY SCRIPT OR NOT ALLOWED ANY ONE TO SEE IT,
THE SCRIPT WAY OR MAKING A SCRIPT...


----------



## Kralc (May 26, 2015)

Super easy. With the script editor open, and the edit window down, hit "Lock with Password". Enter your password twice. Save. Reopen. Should be all good.

Also, your caps lock key might be broken, possibly.


----------



## geolito (May 26, 2015)

Kralc @ Tue May 26 said:


> Super easy. With the script editor open, and the edit window down, hit "Lock with Password". Enter your password twice. Save. Reopen. Should be all good.
> 
> Also, your caps lock key might be broken, possibly.



can some one still be able to see my script, 



and no my Caps Lock key is not broken,hahhahahahaaaa...


----------



## d.healey (May 27, 2015)

They can still see it if they're using a hacked version of Kontakt. There is another way of locking scripts do a forum search, it's been covered before here.


----------



## tomaslobosk (May 27, 2015)

A transparent slider in front of the Edit tab in Kontakt's Script Editor will do the job :lol:


----------



## d.healey (May 27, 2015)

TomiLobosK @ Wed May 27 said:


> A transparent slider in front of the Edit tab in Kontakt's Script Editor will do the job :lol:


 not quite


----------



## mk282 (May 27, 2015)

Yep, gotta disallow automation on it.


----------



## geolito (May 27, 2015)

mk282 @ Wed May 27 said:


> Yep, gotta disallow automation on it.


 so how do u do it...
can u post the script..


----------



## Robym (May 28, 2015)

if you encrypt it with sublime text, it will look gibberish and very hard to decode…so even if someone opens it, it will be very difficult to understand.


----------



## d.healey (May 28, 2015)

I'll post a video soon with detailed instructions


----------



## tomaslobosk (May 28, 2015)

Thanks David :D, my code feels safer already haha


----------



## mk282 (May 28, 2015)

Of course, now that everyone knows what to look for, it will be easier to bypass that kind of locking...


There's always a key, for every lock.


----------



## d.healey (May 28, 2015)

As promised





mk282 @ Thu May 28 said:


> Of course, now that everyone knows what to look for, it will be easier to bypass that kind of locking....


now? You made the basic info available back in 2011  
http://www.vi-control.net/forum/viewtopic.php?t=23859


----------



## geolito (May 28, 2015)

TotalComposure @ Thu May 28 said:


> As promised
> 
> 
> 
> ...




thanks for that , im soo happy ... just what i needed...


----------



## d.healey (May 29, 2015)

TomiLobosK @ Thu May 28 said:


> my code feels safer already haha


Well according to the first comment on the YouTube page this method of protection is entirely ineffective - although the guy who commented refused to say how one could get around it because then we could fix it - so that would imply there is a better way.


----------



## d.healey (May 30, 2015)

After some more research and a helpful tip from someone I can confirm that this method of protecting your script is only useful to stop the casual user looking at it, any hacker worth his salt will still be able to see your script and it will take them only a couple of minutes to do so.


----------



## geolito (May 30, 2015)

TotalComposure @ Sat May 30 said:


> After some more research and a helpful tip from someone I can confirm that this method of protecting your script is only useful to stop the casual user looking at it, any hacker worth his salt will still be able to see your script and it will take them only a couple of minutes to do so.



that ok , i just dont want any one to see my script thats all...
couse it have taking me alot of time, learning how the script work..


----------



## Casey Edwards (May 30, 2015)

TotalComposure @ Sat May 30 said:


> After some more research and a helpful tip from someone I can confirm that this method of protecting your script is only useful to stop the casual user looking at it, any hacker worth his salt will still be able to see your script and it will take them only a couple of minutes to do so.



I take other precautions to protect my scripts and other items. Is the reason they can get around your method because the script isn't as secure as it can be, or because they can hack through Kontakt features? I have started to develop assets that are important for me to protect the best I can.


----------



## d.healey (May 30, 2015)

I can say there is no way to protect your script what so ever in the current versions of Kontakt, it will require a change in Kontakt by NI for the scripts to be at all protected. I'd like to do a video demonstrating it - the information required is already available via google - but if I do I'm sure to be thrown out of the Kontakt scripter's magic circle  so you'll just have to trust me.


----------



## Mike Greene (May 30, 2015)

I do lock my own scripts, but I don’t really think it matters. When the scripts get compiled (by Sublime), all the variables get compacted, plus the comments are stripped. So it would be a major undertaking, even for the best of KSP coders, to figure out what the code is doing.

In fact, the only people who could make heads or tails of my scripts are the same people who don’t *need* to read my scripts. I mean seriously, are Mario or Nils or Blake going to try to hack into my scripts so they can figure out how to do legato? :mrgreen: 

That’s not to say you wouldn’t want to lock them, and like I said, I do lock my own. But it’s not something I worry about.


----------



## Alex Koev (May 31, 2015)

As David said, there is no way to protect your scripts on 100% in the current versions of Kontakt.

Personally, I've never had a need to do that (to read other scripts I mean), but the comment on the YouTube page made me curious . So just for the sport I opened a random library and... it took me less than a minute to get the script 
(it's my +1 for David's comment, not a brag).
Fortunately, the guys who want to learn from your magic, probably can't do that if you lock your library using this method. And as Mike said, the few people who could open your scripts don't really need to do it :mrgreen: .

However, I want to say that people should protect their work if necessary, even though (as Mario said): There's always a key, for every lock.


----------



## olmerk (Feb 8, 2017)

I've been using a transparent button over lock sign, not disabling MIDI automation for it. And it seems to work pretty well. Nothing happens like David showed in the video, when edit button gets clickable underneath. Or am I not aware of something?


----------



## d.healey (Feb 8, 2017)

olmerk said:


> I've been using a transparent button over lock sign, not disabling MIDI automation for it. And it seems to work pretty well. Nothing happens like David showed in the video, when edit button gets clickable underneath. Or am I not aware of something?


There are a couple of ways to bypass this and access the script editor. There is no way to lock Kontakt scripts that can't be broken.


----------



## Tod (Feb 8, 2017)

d.healey said:


> There are a couple of ways to bypass this and access the script editor. There is no way to lock Kontakt scripts that can't be broken.



Heh heh, there have been a couple of times I've wanted to do this. Actually I can narrow it down to one, it is a somewhat known commercial library I bought that was programmed in a way that it is totally useless. I did end up copying the groups and made my own instruments that worked a little better.

Actually David, I don't want to know how to do it, my conscience is clear and I'd like to keep it that way.


----------



## juniorporciuncula (May 3, 2018)

d.healey said:


> There are a couple of ways to bypass this and access the script editor. There is no way to lock Kontakt scripts that can't be broken.


Have you tried to put one ui_slider above other ui_slider and applied a background "cropped" png only to the "first" ui_slider?


----------



## d.healey (May 4, 2018)

juniorporciuncula said:


> Have you tried to put one ui_slider above other ui_slider and applied a background "cropped" png only to the "first" ui_slider?


You can put as many sliders as you like but I can still access your script using a memory viewer or by looking in the resource container  Seriously, there is no point in locking a script, anything you can script I can script and so can anyone else, there is no reason to lock a script.


----------



## juniorporciuncula (May 4, 2018)

d.healey said:


> You can put as many sliders as you like but I can still access your script using a memory viewer or by looking in the resource container  Seriously, there is no point in locking a script, anything you can script I can script and so can anyone else, there is no reason to lock a script.


You cant view the script on resource file if I create the resource file with a blank txt file.


----------



## EvilDragon (May 4, 2018)

But we can extract all the graphics from the NKR, figure out which one was used for the "lock" and replace it with a smaller one, effectively bypassing the lock completely.


----------



## juniorporciuncula (May 4, 2018)

EvilDragon said:


> But we can extract all the graphics from the NKR, figure out which one was used for the "lock" and replace it with a smaller one, effectively bypassing the lock completely.


But below this ui_slider have another ui_slider with no image assigned


----------



## EvilDragon (May 4, 2018)

Easy to find it by position and move it elsewhere. Just... no need to keep on trying. There are better things to do with your time, like doing actual developing


----------



## juniorporciuncula (May 4, 2018)

EvilDragon said:


> Easy to find it by position and move it elsewhere. Just... no need to keep on trying. There are better things to do with your time, like doing actual developing


But how you can move a ui_slider position without access to the script?


----------



## EvilDragon (May 4, 2018)

Tricks of the trade


----------



## juniorporciuncula (May 4, 2018)

EvilDragon said:


> Tricks of the trade


Please, send me a PM showing how you can view the script. I'll really appreciate.


----------



## EvilDragon (May 4, 2018)

David already mentioned it.


----------



## juniorporciuncula (May 4, 2018)

EvilDragon said:


> David already mentioned it.


The method mentioned by David cannot view the script. Again, I create a resource container with a blank.txt and I put two ui_slider on the same position ($lock1 and $lock2). The $lock2 is in front of $lock1. I put a picture lock.png (not transparent) with the crop area of the background only on the $lock2 slider. Behind the $lock2 slider have a $lock1 slider without any picture, so you cant access the edit button.


----------



## EvilDragon (May 4, 2018)

That still doesn't prevent anyone from reading the memory.


----------



## juniorporciuncula (May 4, 2018)

EvilDragon said:


> That still doesn't prevent anyone from reading the memory.


Yes, man. Now I know. Really sad. :(


----------



## EvilDragon (May 4, 2018)

Just don't worry about protecting your script, worry more about making your instrument the best it can be. Are you even doing things worth stealing in that script?


----------



## juniorporciuncula (May 4, 2018)

EvilDragon said:


> Just don't worry about protecting your script, worry more about making your instrument the best it can be. Are you even doing things worth stealing in that script?



Yes, I am


----------



## d.healey (May 4, 2018)

juniorporciuncula said:


> Yes, I am


No you're not  I don't see anything there that hasn't been done before - and I've seen your script 

I don't mean you're library's bad, I just mean that to do what you've done doesn't require someone to steal your script. They might want to steal your graphics though!


----------



## juniorporciuncula (May 4, 2018)

d.healey said:


> No you're not  I don't see anything there that hasn't been done before - and I've seen your script
> 
> I don't mean you're library's bad, I just mean that to do what you've done doesn't require someone to steal your script. They might want to steal your graphics though!



Of course I am. Maybe don't worth to you, but worth to many people who do not have your skill.


----------



## EvilDragon (May 4, 2018)

Yeah that is absolutely nothing special really, script-wise...


----------



## juniorporciuncula (May 4, 2018)

EvilDragon said:


> Yeah that is absolutely nothing special really, script-wise...



Again, I don't say that worth to you, EvilDragon or David, or anybody with KSP skills. But many people want to take advantage of a script that is ready to change the developer name and share on the internet. For these people it is worth it.


----------



## EvilDragon (May 4, 2018)

If somebody wants to steal your script, they will find a way to do it no matter what you try...


----------



## juniorporciuncula (May 4, 2018)

EvilDragon said:


> If somebody wants to steal your script, they will find a way to do it no matter what you try...


Yes, I learned that today. :(


----------



## polypx (May 4, 2018)

Don't stress it. Use those basic protection measures to keep it hidden from amateurs and chill.

The guys who can get past basic security are the same guys that don't need to. Even for me ( a moderate talent, at best) it would be faster to re-create your GUI from scratch than to reverse engineer your personal method.


----------

