Posts: 7236
Joined: Tue Mar 18, 2014 11:47 am

Re: Interpreter ?

Fri May 14, 2021 2:59 pm

mmkw43 wrote:
Fri May 14, 2021 2:11 pm
What are the basics of Cython in a few words? I know nothing about it other than some simple statements I read about "converting python to c" (although I'm sure it's not that simple) Does it offer more protection or worth learning about?

And to answer, the one project has about 3K lines but much of it is repetition because it's an 8 channel device and it also uses tkinter.

I actually (for the fun of it) may delve into C -- I did before briefly but got distracted.
Note that objdump makes a pretty good disassembly of a C binary.

The main strategy I know to keep a third party from looking at a program is to run the code in the cloud. Such things require always-on networking and are subject to network disruptions; however, advances in technology and strong cryptography have made the cloud approach more reliable and less risky over time. It's very popular with mobile phone applications.

Another approach is to make sure your customers agree in writing not to peek at the computer program you supply. This has the drawback--as in the ice-cream maker scandal--that a third party might steal the software from your customer and then peek without having signed the contract. How enforceable such contacts are in the first place is also difficult to ascertain.

Another point of view is that you actually want customers to peek at the program, fix the bugs they find and send the corrections back to you. This is the model under which Linux is distributed and it seems to have been successful.

My feeling is tools available to obscure Python source code are sufficient and C doesn't provide much better protection. One thing I would suggest would be to place a few Easter eggs in the code--some obscure undocumented features mixed in with everything else--that can be used to distinguish whether someone copied your code or engaged in legitimate clean-room reverse engineering practices when creating a look alike. A common example of such an Easter egg would be code that mysteriously prints out your name using a compressed mathematical formula that can be mixed in unobserved with the rest of the program without anyone noticing.

Posts: 768
Joined: Tue Dec 24, 2013 6:18 pm

Re: Interpreter ?

Fri May 14, 2021 6:23 pm

Ok. I have some ideas. I used pyarmor and on the smaller program I have, no issues at all but on the more elegant version of the same thing (with 2x the code), it crashed the script which has never happened at all. I'll end this thread with this but wonder if there are other choices for obfuscating -- or is it just pyarmor?

-- Thank you

edit -- and, what about the possibility of creating a module that obviously isn't a part of python that I import as a necessary part of the script? know nothing about this but reading about cython ? or maybe I can figure out enough C to do something like that?

User avatar
Posts: 7041
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Interpreter ?

Fri May 14, 2021 7:37 pm

ejolson wrote:
Fri May 14, 2021 2:59 pm
Note that objdump makes a pretty good disassembly of a C binary.
Try "super-strip" (I posted a link above).
It removes so much of the "elf" red tape that objdump and gdb don't work.

Posts: 249
Joined: Wed Jan 27, 2021 12:48 pm

Re: Interpreter ?

Sat May 15, 2021 2:00 am

Have a look at Zymbit

I'm not connected to them in any way.
Is a computer language with goto's totally Wirth-less?

Posts: 82
Joined: Tue Apr 28, 2015 10:00 am

Re: Interpreter ?

Mon May 24, 2021 2:31 pm

Also have a look at nuitka. I occasionally find it barfs on some Python code - YMMV

Return to “Python”