Creating Plugin which cannot be read by others after distribution

Hello Everyone!

I’m currently working on creating custom Commands and Plugins using Rhinoscript. I want to distribute the created Plugin with others, but I don’t want to distribute it by copying the Plugin Folder since the script inside is still in .py format which is readable by others.

I want to distribute the Plugin in such a way that others cannot read the script. I have seen that this is the case in any other Plugin I download online, but I’m not exactly able to find the method to do the same.

Do recommend any method which can make the script unreadable and how.

Thanks in Advance.

As far as I know there is option to compile scripts into compiled c# plugin with Rhino Script Compiler, which is under Tools menu. I have used it to distribute python scripts in office.

However in theory it is still possible to decompile such plugin, if some determinated hacker would put his hands on it, violating copyrights. In the end everything could be reverse engineered/cracked, but it would require some effort.

Creating plugin in C++ could be safer, but it is way more than just scripting.

1 Like

FWIW, even compiled C/C++ code can be reverse engineered.

Someone who is determined to reverse engineer will succeed no matter what you try to obfuscate, encrypt and lock up. No doubt it’ll deter those who have not the technical prowess for breaking these, but it is good to be aware that whatever you try it will not be 100% secure.

In the legal realm you can protect yourself with a good EULA. But it’ll be a burden to enforce if you notice a breach.

If you don’t want people to get your code the ultimate safest way is to never distribute your code… :wink:

1 Like

Hey, Thanks for your input! I have not used Rhino Script Compiler before. I tried using it to convert a .py file to a .rhp file. But when I try to add that .rhp file to Rhino, it is recognising the new Command but nothing is happening when I run that command.

Can you explain how one would use the Rhino Script Compiler to create the .rhp? Maybe I’m missing something while creating it.

Thanks

Okay maybe I should have rephrased my question in a better way :sweat_smile:

I understand that there is nothing as 100% unreadable, but my requirement is that when I pass on the plugin it shouldn’t be as simple as opening the file using textpad to read it. I was just expecting something along the line of passing it through a .rhp file or .dll which will not be very explicitly readable.

Thanks for your suggestion!

I am creating new project, adding command where I am pointing to script file, changing command name, and building plugin. Everything works here with python script input.

EDIT: I have digged up some old .rvb script of mine, and noticed if fact, corresponding command is not triggering script. Script works normally when loaded and run through UI. Rhino7 SR7

Maybe @stevebaer or @wim could help.

I can only suggest to rewrite scripts in python at this moment. Python is everywhere nowadays :slight_smile:

What you explained should work. You could send me the script and I can dig into why nothing happens

It’s working now perfectly. Had a moment of stupidity, didn’t check whether the actual script was running. Rhino Script Compiler is working :+1:

Thanks for helping!

Yeah, it’s working now. Had some syntax errors in the actual script, which is why the Command didn’t call the script or show any error.

Anyway, thanks for the solution though! Rhino Script Compiler was really helpful!

Same was with my old script ( :upside_down_face: guilty ), missing “call”, which was not triggered by compiled plugin command, but it worked though UI load/run. Sory for misinformation, glad to see it works.