Files located in the tutorial/step5/files directory:
mousegestures-1.2.jar | Mouse Gestures library jar |
test.jar | Jar with mouse gestures demo frame |
RunAllatori.bat | Runs Allatori Obfuscator |
config.xml | Allatori configuration file |
ExtractWatermark.bat | Runs Allatori's watermark extracting class |
ExtractWatermark.xml | Configuration file for extracting a watermark |
Clean.bat | Deletes generated files |
<config> <jars single-jar="single.jar"> <jar in="test.jar" out="obf-test.jar"/> <jar in="mousegestures-1.2.jar" out="obf-mousegestures-1.2.jar"/> </jars> <keep-names> <class template="class *.TestFrame"/> </keep-names> <property name="log-file" value="log.xml"/> <watermark key="secure-key-to-extract-watermark" value="Customer: John Smith; Date: xx.yy.zzzz"/> </config>
We have added a watermark element with the following attributes:
key - the key that is used to embed a watermark into the application using steganography techniques;
value - any string that will be embedded into the application jars.
It can be such information as copyright, customer name, company name or any other information that uniquely identifies the build.
A watermark can be used to identify owners of the software or track the origin of a pirated copy.
To extract the watermark we need another configuration file:
<config> <jars> <jar in="single.jar"/> </jars> <watermark key="secure-key-to-extract-watermark"/> </config>
We specified the jar file that contains the watermark and the key for the extraction.
The key should match the key used for embedding.
If you specify wrong key the watermark wouldn't be extracted.
Run ExtractWatermark.bat to see the extracted watermark.