On Sunday, 23 November 2014 18:05:53 UTC+2, Wouter van Ooijen wrote:
> Mr Flibble schreef op 23-Nov-14 4:41 PM:
> > On 23/11/2014 09:05, Wouter van Ooijen wrote:
> >> Anyone knows a free C++ obfuscator that can do a single .cpp file?
I don't know of one. C++ is compiled language without standardized
run-time reflection. Run-time reflection is not used by C++ program.
There can be implementation-specific debug information but that is
only used by external tools and so is not deployed with binaries.
Therefore the executable binary is already obfuscated and obfuscators
are for .NET and Java binaries.
> >> It does not need to be CIA-proof, just mangling the internal literals
> >> and names and removing the whitespace is probably enough.
> >
> > What is the point of using such a tool? Either you are closed source in
> > which you don't need it or you are open source in which case you want
> > your code to be legible.
>
> The question remains whether the use has a point or not, but FYI: I am a
> teacher and I want to give my studenst 10 versions of the implementation
> of a class, one (hopefully) correct, and 9 each with one bug.
If the program does anything useful then it contains defects. So there
are no hope that you can provide correct program unless all what it does
is totally abstract and useless.
> Their task
> is to write a set of tests for the class, and find the one correct
> implementation, and for each bug the nature of the bug. Giving the plain
> source would make a text diff approach too easy.
If you are really teacher then you must have *huge* archive of programs
that are all broken in several ways. Even I have such archive despite I
have only sometimes reviewed pre-interview assignments of people who want
to work as C++ programmers. About half of such works do not need any
obfuscators to make them even worse. :D
> My students use different compilers (some of which I don't have), so it
> is not practical for me to give them the object files.
So you do not review their "set of tests" either? They get your code, work
on their compilers and only give you the end results? That sounds rather
distant kind of teaching.