×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    39

    obfuscator vs. preprocessor

    Comparing an obfuscator (e.g. proguard) vs. c preprocessor (e.g. gnu cpp);

    public static final int AAA = 1;
    vs.
    #define AAA 1

    and using AAA in many different classes that is why it is public.

    Is byte-code produced by obfuscator and preprocessor different ? I dont have enough knowledge about byte-code, so I didnt make any reverse engineering.

    I dont really get if obfuscator does the same thing or not.

    Thanks in advance.

    MB

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    It depends on the obfuscator used and the settings you use it with. Proguard with agressive settings will replace all public static final variables with hard-coded data so you would get the same effect.

    You don't need any knowledge about the bytecode to check it for yourself. You can simply use a decompiler to decompile your obfuscated/preprocessed classes to see what happens in easy-to-read Java code.

    shmoove

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    39
    Why would I preserve static finals in the production code, any reason ? Do I miss something ?

    Thank your for the decompilation info.

    Mete

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    No reason, and like I said, with the proper settings they won't be preserved but they will be replaces with literals.

    shmoove

  5. #5
    Registered User
    Join Date
    Apr 2005
    Posts
    39
    OK. Thanks so much.

    MB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×