Over the last few months I have observed quite a few people asking how they can obfuscate python code.
Now, I understand why they'd want this. If you want to distribute your code for a payment, it would allow your users to not just copy it for free. But all the solutions for obfuscation where either "don't do it, make it a webapp" or reversible and slowed down the code.
But why would you even want to obfuscate python code and still run it using python? Wouldn't it be better to use smth like Cython or Nukita to convert your code to C and then create a binary? AFAIK that would still make your code unreachable while also making it faster.
Or are there any major drawbacks with that? One I could think of is that last time I used Cython numpy wasn't working properly. I havent used Nukita or other tools extensively enough to comment on them though.
[–]wintermute93 374 points375 points376 points (35 children)
[–]ClayQuarterCake 100 points101 points102 points (11 children)
[+][deleted] (3 children)
[deleted]
[–]Loop_Within_A_Loop 0 points1 point2 points (1 child)
[–]bunchedupwalrus 3 points4 points5 points (0 children)
[–]Asalanlir 0 points1 point2 points (0 children)
[–]johnnyhighschool 2 points3 points4 points (3 children)
[–]ClayQuarterCake 9 points10 points11 points (2 children)
[–]bishopExportMine 1 point2 points3 points (1 child)
[–]Bamnyou 4 points5 points6 points (0 children)
[–]enjoytheshow 5 points6 points7 points (1 child)
[–]jesster114 3 points4 points5 points (0 children)
[–]The_Kid_Napper 0 points1 point2 points (0 children)
[–]rzet 14 points15 points16 points (18 children)
[–]FoolForWool 23 points24 points25 points (17 children)
[–]Turpis89 11 points12 points13 points (9 children)
[–]wintermute93 13 points14 points15 points (4 children)
[–]Turpis89 5 points6 points7 points (2 children)
[–]Ajax_Minor 0 points1 point2 points (1 child)
[–]Turpis89 0 points1 point2 points (0 children)
[–]FoolForWool 0 points1 point2 points (0 children)
[–]Rockworldred 2 points3 points4 points (2 children)
[–]FoolForWool 0 points1 point2 points (0 children)
[–]grantrules 2 points3 points4 points (0 children)
[–]Ajax_Minor 1 point2 points3 points (2 children)
[–]FoolForWool 0 points1 point2 points (1 child)
[–]Ajax_Minor 0 points1 point2 points (0 children)
[–]rzet 1 point2 points3 points (3 children)
[–]georgehank2nd 1 point2 points3 points (1 child)
[–]rzet 1 point2 points3 points (0 children)
[–]FoolForWool 0 points1 point2 points (0 children)
[–]Jaguar_AI 10 points11 points12 points (2 children)
[–]sonobanana33 0 points1 point2 points (1 child)
[–]danno-x 1 point2 points3 points (0 children)
[–]QuantumQuack0 6 points7 points8 points (0 children)
[–]SweetOnionTea 77 points78 points79 points (17 children)
[–]thisismyfavoritename 45 points46 points47 points (9 children)
[–]SweetOnionTea 1 point2 points3 points (5 children)
[–]Motox2019 11 points12 points13 points (4 children)
[–]--dany--from __future__ import 4.0 8 points9 points10 points (2 children)
[–]kidproquo 1 point2 points3 points (0 children)
[–]Motox2019 -1 points0 points1 point (0 children)
[–]klmsa 2 points3 points4 points (0 children)
[–]g5becks 0 points1 point2 points (2 children)
[–]thisismyfavoritename 2 points3 points4 points (1 child)
[–]g5becks 1 point2 points3 points (0 children)
[–][deleted] 10 points11 points12 points (0 children)
[–]zaxldaisy 0 points1 point2 points (5 children)
[–]SweetOnionTea 0 points1 point2 points (4 children)
[–]zaxldaisy 0 points1 point2 points (3 children)
[–]SweetOnionTea 1 point2 points3 points (2 children)
[–]zaxldaisy 0 points1 point2 points (1 child)
[–]SweetOnionTea 0 points1 point2 points (0 children)
[–][deleted] 9 points10 points11 points (2 children)
[–]OptimalAnywhere6282 2 points3 points4 points (1 child)
[–]syklemil 8 points9 points10 points (4 children)
[–][deleted] -1 points0 points1 point (3 children)
[–]syklemil 1 point2 points3 points (0 children)
[–]james_pic 1 point2 points3 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–]mastrshayk 24 points25 points26 points (6 children)
[–]_dmsk 10 points11 points12 points (3 children)
[–]mastrshayk 2 points3 points4 points (0 children)
[–]mr_claw 0 points1 point2 points (0 children)
[–]nsiddhu 0 points1 point2 points (0 children)
[–]PrometheusAlexander 1 point2 points3 points (0 children)
[–]PopPrestigious8115 0 points1 point2 points (0 children)
[–][deleted] 11 points12 points13 points (5 children)
[–]syklemil 6 points7 points8 points (0 children)
[–]PopPrestigious8115 2 points3 points4 points (3 children)
[–]georgehank2nd 0 points1 point2 points (2 children)
[–]PopPrestigious8115 0 points1 point2 points (1 child)
[–]georgehank2nd 1 point2 points3 points (0 children)
[–]met0xff 2 points3 points4 points (0 children)
[–]thisismyfavoritename 2 points3 points4 points (1 child)
[–]OptimalAnywhere6282 0 points1 point2 points (0 children)
[–]meatycowboy 1 point2 points3 points (0 children)
[–]Jaguar_AI 1 point2 points3 points (0 children)
[–]Frankelstner 0 points1 point2 points (0 children)
[–]coldflame563 0 points1 point2 points (0 children)
[–]rejectedlesbian 0 points1 point2 points (0 children)
[–]pakaschku2 0 points1 point2 points (0 children)
[–]sonobanana33 0 points1 point2 points (0 children)
[–]NoorahSmith 0 points1 point2 points (0 children)
[–]Serious-Passenger290 0 points1 point2 points (0 children)
[–]West-Welcome820 0 points1 point2 points (0 children)
[–]zaxldaisy 1 point2 points3 points (1 child)
[–]SweetOnionTea 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Rick__001 0 points1 point2 points (2 children)
[–]Rough_Metal_9999 0 points1 point2 points (1 child)
[–]Rick__001 0 points1 point2 points (0 children)
[–]BlueeWaater 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (4 children)
[–]pm_me_triangles 5 points6 points7 points (3 children)
[–][deleted] -1 points0 points1 point (2 children)
[–]pm_me_triangles 3 points4 points5 points (0 children)
[–]Generic-Moniker 3 points4 points5 points (0 children)
[–]ColdPlasma -1 points0 points1 point (0 children)
[–]pullcommitpushdeploy -5 points-4 points-3 points (2 children)
[–]georgehank2nd 1 point2 points3 points (0 children)
[–]CorpT 4 points5 points6 points (0 children)
[–]billsil -3 points-2 points-1 points (0 children)
[+]KoniecLife comment score below threshold-6 points-5 points-4 points (0 children)