Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
#DEFINE - Why?
Message
De
01/04/2008 08:29:58
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
01/04/2008 07:31:29
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01306848
Message ID:
01307271
Vues:
9
>>>>
>>>>#DEFINE TaxAmount       _0lO1Ol
>>>>#DEFINE InvoiceSubTotal _0lOlOl
>>>>#DEFINE TaxPercentage   _0lO1O1
>
>.
>.
>.
>>This is exactly my point. Look very closely at my 3 #DEFINEs, they are NOT the same, they're purposely chosen to look alike to a casual read. The whole idea is to obfuscate the code, make it hard to read, and it looks like it has worked perfectly!
>
>Underscore zero one oh one oh one
>
>It must be really good because I dodn't see how they ae different. What is it?
Jay,

there are several ways to see it
-install a better font like Consolas - it will made it very easy to understand ()
-use something like ASC(substr(...))
-copy it to a file and show it in an hex editor.

Anyway if you realy like code obfuscation:

create a file:
*File blabla.h
#IFNDEF dnLoop THEN
#DEFINE dcValue 'Hunting '
#DEFINE dnLoop  1
#ELSE
#IF dnLoop=1
#UNDEFINE dcValue
#DEFINE dcValue 'Hi and Lo'
#UNDEFINE dnLoop
#DEFINE dnLoop  2
#ELIF dnLoop=2
#UNDEFINE dcValue
#DEFINE dcValue 'Ha!'
#UNDEFINE dnLoop
#DEFINE dnLoop  3
#ELIF dnLoop=3
#UNDEFINE dcValue
#DEFINE dcValue 'Ho!'
#UNDEFINE dnLoop
#DEFINE dnLoop  2
#ENDIF
and a prg
*MyProg.prg
#INCLUDE blabla.h
?dcValue
#INCLUDE blabla.h
??dcValue
#INCLUDE blabla.h
?dcValue
#INCLUDE blabla.h
?dcValue
#INCLUDE blabla.h
?dcValue
?'::)'
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform