Create a SIS file does not prevent users from viewing the source code (the python code can be found somewhere in the installation directory). Is there a way I can obfuscate the source code in a SIS file?
Create a SIS file does not prevent users from viewing the source code (the python code can be found somewhere in the installation directory). Is there a way I can obfuscate the source code in a SIS file?
You could compile your code into bytecode (.pyc files). It doesn't obfuscate it as well as on most other languages, but it's at least something.
Hello ,
Decompyle can decompile .pyc file !
But try this open source project pyobfuscator !
http://freshmeat.net/projects/pyobfuscate/
pyobfuscate is nice, but it doesn't make the code completely unreadable. Isn't the pyc route safer?
bercobeute, the pyobfuscate makes decompiled source harder to read.
But anyway, usually there is no point to worry about this. Even if you develop in java or c++, people can decompile and see your algorithms.
I suggest that you distribute .pyo files. If somebody decompiles them, they won't see the comments nor docstrings. This gives about the same level of protection as distributing java or c++ programs (well, python readibility helps to reverse-engineer, so maybe it is bit easier with python).
could someone help me on how to install and use this project please?
i got this error while installing it
C:\pyobfuscate>setup.py install
running install
running build
running install_data
Traceback (most recent call last):
File "C:\pyobfuscate\setup.py", line 17, in <module>
data_files=[('/usr/bin', ['pyobfuscate'])]
File "C:\Python25\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python25\lib\distutils\dist.py", line 974, in run_comm
self.run_command(cmd)
File "C:\Python25\lib\distutils\dist.py", line 994, in run_comm
cmd_obj.run()
File "C:\Python25\lib\distutils\command\install.py", line 510,
self.run_command(cmd_name)
File "C:\Python25\lib\distutils\cmd.py", line 333, in run_comma
self.distribution.run_command(command)
File "C:\Python25\lib\distutils\dist.py", line 994, in run_comm
cmd_obj.run()
File "C:\Python25\lib\distutils\command\install_data.py", line
dir = convert_path(f[0])
File "C:\Python25\lib\distutils\util.py", line 138, in convert_
raise ValueError, "path '%s' cannot be absolute" % pathname
ValueError: path '/usr/bin' cannot be absolute
Hello Hope
Easy ! Comment line with data_files= in setup.py
Result :Code:setup install pyobfuscate pyobfuscate ex1.py >ex1_hidden.py
Have you recognized this code ?Code:import appuifw import e32 import telephone if 64 - 64: i11iIiiIii if 65 - 65: O0 / iIii1I11I1II1 % OoooooooOO - i1IIi appuifw . app . title = u'Incoming call Test' if 73 - 73: II111iiii def IiII1IiiIiI1 ( state ) : appuifw . note ( u"Chiamato" , "info" ) if 40 - 40: oo * OoO0O00 def IIiIiII11i ( state ) : appuifw . note ( unicode ( '0:' + str ( state [ 0 ] ) + ';1:' + str ( state [ 1 ] ) ) , "info" ) if ( state [ 0 ] == telephone . EStatusRinging ) : IiII1IiiIiI1 ( state ) if 51 - 51: oOo0O0Ooo * I1ii11iIi11i if 48 - 48: oO0o / OOooOOo / I11i / Ii1I def quit ( ) : IiiIII111iI . signal ( ) if 34 - 34: iii1I1I / O00oOoOoO0o0O . O0oo0OO0 + Oo0ooO0oo0oO . I1i1iI1i - II appuifw . app . exit_key_handler = quit IiiIII111iI = e32 . Ao_lock ( ) if 100 - 100: i1IIi . I1i1iI1i / Oo0ooO0oo0oO * OoooooooOO + iii1I1I * I11i telephone . call_state ( IIiIiII11i ) #telephone.incoming_call() if 99 - 99: O0oo0OO0 . Ii1I / iIii1I11I1II1 * iIii1I11I1II1 IiiIII111iI . wait ( )
BR
Cyke64
pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !
Find my pys60 extension modules on cyke64.googlepages.com
hello cyke64,thanks for replying
i still can't get it ,i'm new to this
could you explain more please and how to convert .pyc file to .pyo!
cyke64 you mean i should add that 1st code to setup.py?
please explain
pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !
Find my pys60 extension modules on cyke64.googlepages.com
i still can't install it
here is the setup.py file
http://rapidshare.com/files/85388473/setup.zip.html
can you add that code to it?
Okay I have downloaded your file ...
The following code works for me ...
Do you use M$ windows or Linux or MAC ?Code:#!/usr/bin/env python DESCRIPTION = """\ Python source code obfuscator """ from distutils.core import setup setup (name = "pyobfuscate", version = "0.3", license = "GPL", description = "pyobfuscate", long_description = DESCRIPTION, author = "Peter Astrand", author_email = "astrand@cendio.com", url = "http://www.lysator.liu.se/~astrand/projects/pyobfuscate/", #data_files=[('/usr/bin', ['pyobfuscate'])] )
BR
Cyke64
pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !
Find my pys60 extension modules on cyke64.googlepages.com
i'm using windows & i always get this error
File "C:\Python25\lib\distutils\util.py", line 138, in convert_
raise ValueError, "path '%s' cannot be absolute" % pathname
ValueError: path '/usr/bin' cannot be absolute
with the code you posted i got
running install
running build
then nothing happend
I'm using also Windows and here's the result of installation :
BRCode:C:\app\pyobfuscate-0.3>setup install running install running build running install_egg_info Removing C:\Python25\Lib\site-packages\pyobfuscate-0.3-py2.5.egg-info Writing C:\Python25\Lib\site-packages\pyobfuscate-0.3-py2.5.egg-info
Cyke64
pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !
Find my pys60 extension modules on cyke64.googlepages.com
but i don't have microsoft c++ compiler
i installed mingw32 then uninstalled it