SandMark version 2.1


sandmark.obfuscate.loop
Class ObfuscationLoop

java.lang.Object
  |
  +--sandmark.Algorithm
        |
        +--sandmark.obfuscate.GeneralObfuscator
              |
              +--sandmark.obfuscate.AppObfuscator
                    |
                    +--sandmark.obfuscate.loop.ObfuscationLoop

public class ObfuscationLoop
extends AppObfuscator

ObfuscationLoop is an application level obfuscator that runs a random subset (possibly all) of obfuscations. The set of obfuscations is determined by the dependency information provided by each algorithm.

Author:
Kelly Heffner

Field Summary
static boolean DEBUG
          Debugging flag used by the author.
 
Constructor Summary
ObfuscationLoop()
          Creates an ObfuscationLoop object.
 
Method Summary
 void apply(ClassFileCollection cfc)
          Runs a series of different obfuscation algorithms on the class file collection.
 java.lang.String getAlgHTML()
          Gives a description of what the algorithm does.
 java.lang.String getAlgURL()
          Specifies the URL of where the user can find more information about the algorithm.
 java.lang.String getAuthor()
          Specifies the author of the algorithm.
 java.lang.String getAuthorEmail()
          Specifies the email address author of the algorithm.
 ConfigProperties getConfigProperties()
          Gets the ConfigProperties object which specifies the parameters for this run of the algorithm.
 java.lang.String getDescription()
          Specifies what this algorithm does, briefly.
 java.lang.String getLongName()
          Specifies this algorithm's long name.
 java.lang.String getShortName()
          Specifies this algorithm's short name.
static void main(java.lang.String[] args)
          A command line testing method.
 void setConfigProperties(ConfigProperties p)
          Sets the ConfigProperties object which specifies the parameters for this run of the algorithm.
 
Methods inherited from class sandmark.obfuscate.AppObfuscator
toString
 
Methods inherited from class sandmark.Algorithm
getMutations, getPostprohibited, getPostrequisites, getPostsuggestions, getPreprohibited, getPrerequisites, getPresuggestions, getReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
Debugging flag used by the author.

See Also:
Constant Field Values
Constructor Detail

ObfuscationLoop

public ObfuscationLoop()
Creates an ObfuscationLoop object.

Method Detail

apply

public void apply(ClassFileCollection cfc)
           throws java.lang.Exception
Runs a series of different obfuscation algorithms on the class file collection.

Specified by:
apply in class AppObfuscator
Parameters:
cfc - the classes to obfuscate
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
A command line testing method.

Parameters:
args - args[0] should contain the name of the jar file to obfuscate
java.lang.Exception

getShortName

public java.lang.String getShortName()
Description copied from class: Algorithm
Specifies this algorithm's short name. A short name should be no longer than 20 characters, and contain capitalized space delimited words (i.e. title case). For example, an obfuscation that sets all of the fields in a jar file to public scoping should have a short name like "Set Fields Public".

Specified by:
getShortName in class Algorithm
Returns:
the short name for this algorithm

getLongName

public java.lang.String getLongName()
Description copied from class: Algorithm
Specifies this algorithm's long name. There is no limit on the size of the long name, but it should be in title case.

Specified by:
getLongName in class Algorithm
Returns:
the long name for this algorithm

getAuthor

public java.lang.String getAuthor()
Description copied from class: Algorithm
Specifies the author of the algorithm.

Overrides:
getAuthor in class Algorithm
Returns:
the name of the author of the algorithm

getAuthorEmail

public java.lang.String getAuthorEmail()
Description copied from class: Algorithm
Specifies the email address author of the algorithm.

Overrides:
getAuthorEmail in class Algorithm
Returns:
the email address of the author of the algorithm

getAlgURL

public java.lang.String getAlgURL()
Description copied from class: Algorithm
Specifies the URL of where the user can find more information about the algorithm. This URL should point to the help.html file in the doc directory where the algorithm resides, starting from the sandmark directory. For example, the URL for the static_template watermarking sample would be sandmark/watermark/static_template/doc/help.html

Specified by:
getAlgURL in class Algorithm
Returns:
a URL to the help.html file for the algorithm

getAlgHTML

public java.lang.String getAlgHTML()
Description copied from class: Algorithm
Gives a description of what the algorithm does. This should not be a long description of what your code does, rather a brief description as to what effect it has on the program. For example, a good algorithm description would be "Set Fields Public changes the scope of all static and non-static fields to public."; a bad algorithm description would be "Set Fields Public creates a BCEL object for each class and makes modifications to it, then stores it back into the jar file."

Specified by:
getAlgHTML in class Algorithm
Returns:
an HTML formatted description of what the algorithm does.

getDescription

public java.lang.String getDescription()
Description copied from class: Algorithm
Specifies what this algorithm does, briefly. This description is displayed to the user in the log of execution in Sandmark.

Overrides:
getDescription in class Algorithm
Returns:
a brief description of the algorithm

getConfigProperties

public ConfigProperties getConfigProperties()
Description copied from class: Algorithm
Gets the ConfigProperties object which specifies the parameters for this run of the algorithm.

Specified by:
getConfigProperties in class Algorithm
Returns:
the parameters for this run of the algorithm

setConfigProperties

public void setConfigProperties(ConfigProperties p)
Description copied from class: Algorithm
Sets the ConfigProperties object which specifies the parameters for this run of the algorithm.

Specified by:
setConfigProperties in class Algorithm
Parameters:
p - the parameters for this run of the algorithm

SandMark version 2.1

Wed Jul 3 17:27:43 MST 2002