Is this the intended behavior of modules that are compiled with the Script Editor to expose the actual code files to the end user in the AppData/Roaming folder?
If so, isn’t that a huge problem as anyone could have easy access to that source code contained within a module of a plugin?
When I look at other plugins in the packages/8.0 folder they have .dlls, some .json settings stuff here and there, but never do I see any exposed C# or Python files anywhere.
Code that gets compiled as a command with the Script Editor Package Project does not produce a “cmds” folder with the exposed code so I wouldn’t expect the modules to either but it is creating this “libs” folder with subfolders and then the actual source code of the modules.
I would think the compiler would create something like
Always assume that when you are sharing scripts in published plugins, the source is either embedded or deployed on the target machine. Not all supported languages allow ‘compiling’ scripts into machine code so published plugins carry the source (and package requirements embedded within the source).
In case of CPython, I need to put the python module on the local disk so I can add the path to python runtime. Same with dotnet libs. They get compiled as a .dll and placed on disk which means that it is trivial to look at the source or grab and use that in other places
I see, thanks for the explanation and clarifying that.
While I am aware that there’s always a level of exposure and potential for reverse engineering I was shocked to see the actual .py files up for grabs that easily in the module libs/ folder but it does make sense when you explain it.
Sounds like I have more options for containment when using C# or in general if I keep code in my main scripts/commands those will at least live inside the .rhp files and such?
Though I imagine the .rhp and .gha files can be reverse engineered as well… but at least it is not as easy as actually just directly opening a .py file on disk I hope? haha
For native DLLs it takes a bit more effort, but it is not impossible.
Python is an interpreted language, not a compiled one.
edit/addendum:
Often in EULAs you’ll find clauses that tell you reverse-engineering is not allowed. Legal protection is pretty much the only protection you have. Enforcing all that is hard, and I can’t imagine that taking actual action is going to be less hard.
The best protection is to not release your code to users. I suppose that is one reason internet services exist. The IP stays on vendor-controlled equipment, does not ever end up on user equipment.