473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Re: Any reliable obfurscator for Python 2.5

En Sun, 20 Apr 2008 10:32:36 -0300, Banibrata Dutta <ba*************@gmail.comescribió:
On 4/20/08, Gabriel Genellina <ga*******@yahoo.com.arwrote:
>>
En Sun, 20 Apr 2008 01:55:51 -0300, Banibrata Dutta <
ba*************@gmail.comescribió:
Wanted to check if there is any known, reliable, FOSS/Libre --
Obfurscator
for Python 2.5 code.

Why do you want to do that in the first place?


I need to do to retain the confidentiality for certain core components,
which are not supposed to be open. While I do have the option of
implementing them in C/C++, I'm trying to see if I can avoid that for 2
reasons --
1. Its a fairly large and complex set of components, and doing it in C/C++
'might' take significantly longer.
2. I'd try to avoid having mix of languages if possible. It makes the
developement easier to maintain/manage over a period of time.

There is very few you can do to obfuscate Python code. You can't rename
>classes nor methods nor global variables nor argument names due to the
dynamic nature of Python. All you can safely do is to remove comments and
join simple statements using ;


I do not understand the nuances of dynamic languages completely, so this
might be a foolish assumption, but if i make a complete, self-contained
Python application (collection of modules), then just before shipping a
production copy, why can't I replace 'all' symbols i.e. classes, methods,
variables etc ? Esply if I'm compiling the source ?
Because *any* string can be used to retrieve an attribute, it is not easy to replace *every* occurence of an attribute name (the code may use arbitrary expressions with getattr). The code may contain external references to class names (e.g. pickles, logging config files) that must be kept; also code that uses exec/eval will not find the referenced objects. Even local names are necesary in some cases like "%(some)s %(format)d" % locals().
If you remove docstrings, some things may break. Even renaming local
>variables isn't safe in all cases.

Hmmm... but I'm aware of atleast 2 Obfuscators one commercial and one FOSS,
that seem to exist for Python. The commercial one is what I might try if I
don't find anything FOSS. The FOSS one seems to be a dead project. If they
are (or have been) there, I guess obfuscation is a doable thing, no ?
Sure, it can be done - with a lot of care, and I'm sure *some* code will fail. You may distribute compiled .pyc files - that's enough for most people who cares at all. Paranoids use a modified version of the interpreter incompatible with the standard one.
In any case, bug reports (including tracebacks) are less valuable and harder to read.

--
Gabriel Genellina

Jun 27 '08 #1
0 1091

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Aubrey Hutchison | last post by:
Using Python 2,3,2 with idle for developing programs about 200 lines long. - Problem is not common to any specific program. Program are rather simple with no trick programming. Usually no classes...
0
by: relisoft | last post by:
Seattle, WA -- Seattle-based Reliable Software® announces the release their Windows Library into the public domain. Reliable Software Windows Library, RSWL, is the foundation for their compact,...
5
by: Pierre-Eric.Melchy | last post by:
Hello, I have a class measurement representing a physical measurement. Different objects in this class represent laboratory equipment, which might raise an exception (e.g. overtemperature). ...
11
by: OlafMeding | last post by:
Because of multithreading semantics, this is not reliable. This sentence is found in the Python documentation for "7.8.1 Queue Objects". This scares me! Why would Queue.qsize(), Queue.empty(...
4
by: John Grant | last post by:
If I build a web services today with VS 2005 does it support reliable messaging? If I use WSE 3.0 will it support reliable messaging? If I don’t have reliable messaging can I make a web method...
1
by: relisoft | last post by:
SEATTLE, Washington. - July 12, 2006: Reliable Software® announces the upcoming release of Code Co-op® version 5.0. Code Co-op is an affordable peer-to-peer version control system for distributed...
5
by: pabloski | last post by:
Hi to all I have a question about the for statement of python. I have the following piece of code where cachefilesSet is a set that contains the names of 1398 html files cached on my hard disk ...
0
by: eliss | last post by:
Hi everyone, I'm trying to write a python script to whois a few domains twice a day so I get notified when they become available. I did it 2 ways, but neither way is very reliable, so I'm asking...
1
by: =?Utf-8?B?S2F1c2hhbCBNZWh0YQ==?= | last post by:
Hi, I am facing the ServerTooBusyException when using reliable session and net.tcp binding. I have single server and single client application. The client registers for the event at the...
9
by: Steve Holden | last post by:
Banibrata Dutta wrote: The Python world isn't particularly paranoid about obfuscation. It's quite easy to publish compiled code only (.pyc and/or .pyo files), and that offers enough protection for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.