Re: Cython, really secure?
You might want to be careful of tracebacks.They can give away things you don't want given away, like which attribute your checking for a token so make sure to check it exists first, and crash if it doesn't probably by doing something likex=lambda x: x()x()I am
Re: Cython, really secure?
+1 to Sam who really hit the nail on the head and eloquently said about what I was thinking. I might have a bit more to add at some point, but the one thing here is in reference to monkeypatching and the dir function.Monkeypatching can be great at times, no doubt
Re: Cython, really secure?
at post 21 that worked thank you.At defender yeah that's a good idea. And it is very likely to work as people are going to have a hard time converting the .pyd files to pure and readable code, so it's very likely that they won't even find out about the licence
Re: Cython, really secure?
the thing is, if they do del builtins.dir all your work will be gon.
URL: https://forum.audiogames.net/post/446023/#p446023
--
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman
Re: Cython, really secure?
Overriding any built-in function in Python is trivial:import builtins
# modify dir...
def dir(object=None):
return []
builtins.dir = dirYou can do that with any other built-in function. Be careful though, you can break the interpreter if your not careful
Re: Cython, really secure?
I'm not very knowledgeable on this topic, but along the same lines as what Sam was saying, could you not also find ways to hide little indicators in the contents/metadata of some of the files needed to run the program, or even tiny, seemingly innocuous but unique
Re: Cython, really secure?
I'm not very knowledgeable on this topic, but along the same lines as what Sam was saying, could you not also find ways to hide little indicators in the contents/metadata of some of the files needed to run the program?I'm sure others can come up with way better
Re: Cython, really secure?
But the token should work fine. You can have a maybe a 10 digits token so guessing it is nearly impossible too
URL: https://forum.audiogames.net/post/445908/#p445908
--
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https
Re: Cython, really secure?
there is another waysuppose you wrote a module in cython and overrided dir()then if the person uses del to delete it, then he can use dir() again.
URL: https://forum.audiogames.net/post/445859/#p445859
--
Audiogames-reflector mailing list
Audiogames
Re: Cython, really secure?
From what I know, You can't monkey patch the dir function unless the person whose trying to dir your .pyd file, do from dotpydfile import * to get their dir function replaced with the function you specefy in the .pyd file. Or maybe there's another way of monkey
Re: Cython, really secure?
@14, You are right.now, I'm here to give advice for protecting the cythonized code.1. cythonize your python code2. after cythonizing, pack it with a packer like nspack, upx (not recommended), aspack etc.3. use pyInstaller to make an executable (this time don't
Re: Cython, really secure?
@14, very good reasoning, and extra props for understanding the roots of cryptography.
URL: https://forum.audiogames.net/post/445758/#p445758
--
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin
Re: Cython, really secure?
Right, just a couple things. Protecting code was a huge reason I avoided python for years, what's the point when you can just quick run uncompyle6 on your code. It fell mostly on me, with some help, to figure out a way to protect NVG. These are my findings. So
Re: Cython, really secure?
When you really want to optimize Python code, start writing Cython code itself, meaning .pyx and .pxd files. Your Python code, even though it can be optimized very well by using Cython bindings python-internally, will never be as fast as pure Cython code.Cythons
Re: Cython, really secure?
So If I compile all .py files in my application to .pyd with cython, and assuming that my code is optimized, Do I still get the speed increase bennifit without compiling the used modules such as pyglet or pyperclip?
URL: https://forum.audiogames.net/post/445413
Re: Cython, really secure?
Well, the Cython generated code is C/C++ and compiled to machine code, but it still needs an interpreter to run on. Its basically a shared extension for Python. Its harder to read data out of it, since its not byte code but machine code instead, but still
Re: Cython, really secure?
Ethin wrote:@8, no, not unless your embedding it in a C/C++ application -- and even then you wouldn't compile the cython-generated files as an executable since they contain no entry points.i don'T know mutch about it bu, you still have chance to build exicutable
Re: Cython, really secure?
@8, no, not unless your embedding it in a C/C++ application -- and even then you wouldn't compile the cython-generated files as an executable since they contain no entry points.
URL: https://forum.audiogames.net/post/445239/#p445239
--
Audiogames-reflector
Re: Cython, really secure?
Why do you leav it as a pyv file? wouldn't you compile it in to an exicutable?
URL: https://forum.audiogames.net/post/445224/#p445224
--
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin
Re: Cython, really secure?
Its not set in stone, no. Python is fully open-source, so you are free to modify the bytecodes of the program (they're preprocessor definitions, I believe). Cython is not designed to obscure code or protect it from unauthorized individuals; its designed
Re: Cython, really secure?
nuno69 wrote:A question out of curriosity, how much speed you gain by "cythonizing"?According to this source, optimized Cython code can get up to 100 x as fast as pure Python code.Best Regards.Hijacker
URL: https://forum.audiogames.net/post/44520
Re: Cython, really secure?
A question out of curriosity, how much speed you gain by "cythonizing"?
URL: https://forum.audiogames.net/post/445187/#p445187
--
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.c
Re: Cython, really secure?
I thought cython was purely made for speeding up code. Any obscurity you gain is a bonus and not the main goal of the project. Regardless, a version of your compiled interpreter has to be shipped with your code, otherwise it will not run. So people can still
Re: Cython, really secure?
Can you elaborate on that? I thought the bike code was set in stone. Also, thank you for clearing up the misconception about the purpose of cythonizing
URL: https://forum.audiogames.net/post/445175/#p445175
--
Audiogames-reflector mailing list
Audiogames
Re: Cython, really secure?
Can you elaborate on that? I thought the bike code was set in stone.
URL: https://forum.audiogames.net/post/445175/#p445175
--
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman
Re: Cython, really secure?
The goal of Cython isn't to protect people from using your code indirectly (via Cython) but from getting access to the source code. (Its also used for making code faster, but that's neither here nor there.) So, I'd say 'no', unless you change the python bytecode
Cython, really secure?
So, suppose you have cythonized your code into a .pyd file. However, is that really secure?I'm asking because, if I import a cython file, I can figure out what functions and variables it has by using dir() on it. Sure it will take some time, but does that really
27 matches
Mail list logo