For Programmers: Free Programming Magazines  


Home > Archive > Fortran > April 2005 > Source code obfuscation









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Source code obfuscation
Zoltan Radnai

2005-03-24, 4:00 pm

Does there exist a source code obfuscator for Fortran 90? Preferably a free
one. Any help or ideas would be appreciated.


Paul Van Delst

2005-03-24, 4:00 pm

Zoltan Radnai wrote:
> Does there exist a source code obfuscator for Fortran 90? Preferably a free
> one. Any help or ideas would be appreciated.


Hello,

Unless it's used to indicate to your "Programming in Fortran 101" students how *not* to
code in Fortran, don't do it. :o)

If you're trying to protect your source code/intellectual property, why not distribute
your work as a pre-built library?

cheers,

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC

beliavsky@aol.com

2005-03-24, 4:00 pm

Paul Van Delst wrote:
> Zoltan Radnai wrote:
Preferably a free[color=darkred]
>
> Hello,
>
> Unless it's used to indicate to your "Programming in Fortran 101"

students how *not* to
> code in Fortran, don't do it. :o)
>
> If you're trying to protect your source code/intellectual property,

why not distribute
> your work as a pre-built library?


Maybe you cannot or do not want to generate libraries for all the
compiler/OS/hardware of prospective users.

The Math =E0 la Carte library at http://mathalacarte.com/license.html
sells Fortran codes in two versions, "mangled" at a lower price and the
original at a higher price, charging people more for code if they want
to be able to read it and possibly extend it.

For the OP: there are commercial Fortran tools such as Nagware that
allow one to rename variables within a code. They are intended to
improve code by using better variable names (possibly exceeding the
6-character limit of Fortran 77), but they could be used in the other
direction as well :). Create variable and procedure names at random,
strip comments, and remove indentation (even better, use semicolons to
cram lots of statements on one line) and you are well on you way to
unreadable code.

jon

2005-03-24, 8:58 pm

Also (this is evil) you could make all names in your code the same
length, say, 32 characters long, made up of the set of characters
"0Ol1" mixed randomly (with an uppercase O or lowercase l as the first
character). Come up with an original list of names then use a global
search and replace to substitute your names. Also, since Fortran
doesn't have reserved names, throw in a few keyword-looking names as
variable names, for fun. Use ASSIGN, computed GOTOs, arithmetic IFs,
alternate RETURNs. Never return from the end of a procedure, hide it
well within the center of the code, even using a meaningless IF
expression that returns TRUE to appear to only return in that
particlular case. Never indent. Don't use modern controls structures.
Arbitrarily use array bounds of, say, -23:57 when you could just use
(1:whatever). Often use 0: as the base of array bounds, it will make
you look clever and anyone trying to maintain it later will continually
shoot themselves in the foot thinking the base is 1:. Just don't be
consistent in this. If possible, avoid using subroutines. Occasionaly
use meaningful sounding names that are completely misleading and have
nothing to do with what is going on at the time. If possible, embed as
may preprocessor directives in the code as possible, even if they don't
do anything.
And last: buy insurance and watch your back ;^)

meek@skyway.usask.ca

2005-03-24, 8:58 pm

In a previous article, "Zoltan Radnai" <rzoli@yahoo.com> wrote:
>Does there exist a source code obfuscator for Fortran 90? Preferably a free
>one. Any help or ideas would be appreciated.
>
>

Write it in C , or better still C++, and call it from
fortran 90.
C/C++ automatically does the obfuscation for you :)
Chris
E. Robert Tisdale

2005-03-24, 8:58 pm

Zoltan Radnai wrote:

> Does there exist a source code obfuscator for Fortran 90?


It isn't necessary is it? ;-)
meek@skyway.usask.ca

2005-03-24, 8:58 pm

In a previous article, "E. Robert Tisdale" <E.Robert.Tisdale@jpl.nasa.gov> wrote:
>Zoltan Radnai wrote:
>
>
>It isn't necessary is it? ;-)

You're thinking of F95 or 2003

Chris
bv

2005-03-25, 3:58 am

m@skyway.usask.ca wrote:
>
> Write it in C , or better still C++, and call it from
> fortran 90.
> C/C++ automatically does the obfuscation for you :)


or get the same effect by rewriting it in F95... just peruse through
some samples in clf for "guidelines" to coding mess. e.g. a regular
droner posted a two pg matrix print massager that classics could handle
with a few lines.

Ira Baxter

2005-03-25, 8:57 pm

"Zoltan Radnai" <rzoli@yahoo.com> wrote in message
news:d1um0u$4qv$1@gemini.csx.cam.ac.uk...
> Does there exist a source code obfuscator for Fortran 90? Preferably a

free
> one. Any help or ideas would be appreciated.


We build source code obfuscators for many languages,
based on our parsing technology. We have a full
F95 front end, so we could do this pretty easily.
See http://www.semdesigns.com/Products/...tors/index.html

Contact me for further discussion.


--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com


Richard E Maine

2005-04-23, 3:58 pm

In article <25MAR05.00092086@skyway.usask.ca>, m@skyway.usask.ca
wrote:

> You're thinking of F95 or 2003


Independent of what you might think about the various versions, f95 is
almost indistinguishable from f90 in the large. I rather doubt that
anyone would consider it a very good obfuscator of f90 regardless of
their other opinions. The "big" changes were in f90 and f2003 - not f95.

--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com