翻譯|使用教程|編輯:莫成敏|2019-08-30 11:41:38.940|閱讀 1747 次
概述:Allatori Java obfuscator是第二代Java代碼混淆器,為您的知識產權提供全方位的保護。本文主要介紹Allatori Java obfuscator配置文件結構~
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
Allatori Java obfuscator是第二代Java代碼混淆器,為您的知識產權提供全方位的保護。大部分第二代混淆器都具有保護功能。Allatori除了保護功能之外,還附加了一系列的功能,幾乎可以抵御一切的代碼攻擊。同時,Allatori可以讓您的程序體積更小,速度更快,效果簡直讓人難以置信。本文主要介紹Allatori Java obfuscator配置文件結構~
Allatori配置文件是一個XML文件,具有以下結構:
	
<config>
    <input basedir="input-jars" single-jar="application.jar">
        <jar in="app.jar" out="app-obf.jar"/>
        <jar in="input/*.jar" out="output/*.jar"/>
        <dir in="in-dir" out="out-dir"/>
    </input>
    <classpath basedir="library-jars">
        <!-- Adding library.jar to the classpath -->
        <jar name="library.jar"/>
        <!-- Adding all jars in the lib directory to the classpath -->
        <jar name="lib/*.jar"/>
        <!-- Adding all jars in the lib2 directory and its subdirectories to the classpath -->
        <jar name="lib2/**/*.jar"/>
    </classpath>
    <keep-names>
        <class template="class SomeClass"/>
        <class template="class * instanceof java.io.Serializable"/>
        <class template="class com.package.*"/>
        <class access="protected+">
            <field access="protected+"/>
            <method access="protected+"/>
        </class>
        <class template="class com.company.abc.*">
            <field template="public int *"/>
            <method template="public get*(*)"/>
            <method template="public set*(*)"/>
        </class>
    </keep-names>
    <watermark key="secure-key-to-extract-watermark" value="Customer: John Smith"/>
    <expiry date="2017/01/01" string="EXPIRED!"/>
    <!-- Configuration properties, all properties are optional -->
    <!-- General properties, we recommend to use these two properties -->
    <property name="log-file" value="renaming-log.xml"/>
    <property name="random-seed" value="type anything here"/>
    <!-- String encryption -->
    <property name="string-encryption" value="enable"/>
    <property name="string-encryption-type" value="fast"/>
    <property name="string-encryption-version" value="v4"/>
    <property name="string-encryption-ignored-strings" value="patterns.txt"/>
    <!-- Control flow obfuscation -->
    <property name="control-flow-obfuscation" value="enable"/>
    <property name="extensive-flow-obfuscation" value="normal"/>
    <!-- Renaming -->
    <property name="default-package" value="com.package"/>
    <property name="force-default-package" value="enable"/>
    <property name="packages-naming" value="abc"/>
    <property name="classes-naming" value="compact"/>
    <property name="methods-naming" value="compact"/>
    <property name="fields-naming" value="compact"/>
    <property name="local-variables-naming" value="optimize"/>
    <property name="update-resource-names" value="enable"/>
    <property name="update-resource-contents" value="enable"/>
    <!-- Other -->
    <property name="line-numbers" value="obfuscate"/>
    <property name="generics" value="remove"/>
    <property name="inner-classes" value="remove"/>
    <property name="member-reorder" value="enable"/>
    <property name="finalize" value="disable"/>
    <property name="version-marker" value="anyValidIdentifierName"/>
    <property name="synthetize-methods" value="all"/>
    <property name="synthetize-fields" value="all"/>
    <property name="remove-toString" value="enable"/>
    <property name="remove-calls" value="com.package.Logger.debug"/>
    <property name="output-jar-compression-level" value="9"/>
    <!-- Incremental obfuscation -->
    <property name="incremental-obfuscation" value="input-renaming-log.xml"/>
</config>
注意1:所有相對路徑都是根據配置文件位置解析的。
注意2:如果從Ant運行Allatori,則可以使用標準Ant語法引用Ant構建文件中定義的屬性:$ {PropertyName}。
注意3:可以分別使用$ {System.getProperty(property.name)}和$ {System.getenv(VARIABLE_NAME)} 引用系統屬性和環境變量。
想要購買該產品正版授權,或了解更多產品信息請點擊
掃描關注慧聚IT微信公眾號,及時獲取最新動態及最新資訊
	 
 
	
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@ke049m.cn