yWorks / yGuard

The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts

Home Page:https://yworks.github.io/yGuard/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to obfuscate methods and class names?

risharde opened this issue · comments

Hi guys, very new to yGuard. I finally got it going with the following xml but I notice that yGuard doesn't change methods, class names etc. I'm wondering if I over expected from this obfuscator. Can you HOW to automatically obfuscate methods, class names etc. I've used "Java Decompiler" and noticed that my method names are seen in plain sight. Also obfuscation strings should be something you guys should seriously be thinking about.

Desperate to get this going. Please advise. Thanks

`


    <inoutpair in="dist\main.jar" out="dist\main_obf.jar"/>

    <shrink logfile="shringlog.txt">
      <keep>
        <class classes="protected"
        methods="protected" fields="protected">
        </class>
      </keep>
    </shrink>

    <rename mainclass="app.main" logfile="renamelog.txt">
      <property name="error-checking" value="pedantic"/>

      <keep>
        <class classes="protected"
        methods="protected" fields="protected">

        </class>
      </keep>
    </rename>

  </yguard>

</target>	`

Because you told it to do so:

<keep>
        <class classes="protected"
        methods="protected" fields="protected">

        </class>
</keep>
```