com.thehackerschoice.shagg
Class Shagg

java.lang.Object
  |
  +--com.thehackerschoice.shagg.Shagg

public class Shagg
extends java.lang.Object

THC-Shagg is a modular application to break serial numbers that use known check digit algorithms. A supplied set of serial numbers is checked against all algorithms in shagg.algorithms using all possible partitions and weights (if the algorithm uses weights).

Each combination is stored as a "state" and maintained in a red-black tree (using the Java implementation TreeMap, this may change in future versions). If all numbers have been analysised all states are removed that donnot match a specified number of serial numbers, by default they need to match all numbers. In case of a large set of serial numbers, an automatic clear is forced during the progress to reduce memory usage and insertion time.

If a specific number of states has have been found these states can be saved to a file. Using this file THC-Shagg is able to generate more serial numbers that match the states and have the same properties as the initial set of serial numbers.

THC-Shagg is the future of THC-Credit and THC-PassId.

The analyse is done inside the class Laboratory and the generation of new serial numbers is done in the class Factory. Simple, he?

Version:
$Id: Shagg.java,v 1.11 2001/12/14 14:33:07 plasmoid Exp $
Author:
Plasmoid (plasmoid@thehackerschoice.com), THC
See Also:
Laboratory, Factory, CheckDigitAlgorithm

Field Summary
protected static int digitRadix
           
protected static int failureTolerance
           
private static boolean generationMode
           
private static boolean listStates
           
protected static int maxPrintedStates
           
protected static long maxStatesUncleared
           
protected static int maxWeightsLen
           
protected static int minPartitionLen
           
protected static int minSerialNumbers
           
protected static int[] numberPrefix
           
protected static int numbersToGenerate
           
private static java.lang.String README_FILE
           
protected static java.lang.String saveFilename
           
protected static int serialNumberLen
           
private static java.lang.Class shagg
           
private static java.lang.String USAGE_FILE
           
protected static boolean verbose
           
private static java.lang.String VERSION_FILE
           
 
Constructor Summary
Shagg()
           
 
Method Summary
static void abort(java.lang.String message)
           
static CheckDigitAlgorithm[] initAlgorithms()
           
static void main(java.lang.String[] args)
           
static void print(java.lang.String message)
           
static void printAlgorithms()
           
static void printFile(java.lang.String filename)
           
static void println(java.lang.String message)
           
static void printStates(java.lang.String filename)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

README_FILE

private static final java.lang.String README_FILE

USAGE_FILE

private static final java.lang.String USAGE_FILE

VERSION_FILE

private static final java.lang.String VERSION_FILE

minSerialNumbers

protected static final int minSerialNumbers

digitRadix

protected static final int digitRadix

serialNumberLen

protected static int serialNumberLen

maxWeightsLen

protected static int maxWeightsLen

minPartitionLen

protected static int minPartitionLen

maxPrintedStates

protected static int maxPrintedStates

failureTolerance

protected static int failureTolerance

numbersToGenerate

protected static int numbersToGenerate

maxStatesUncleared

protected static long maxStatesUncleared

verbose

protected static boolean verbose

saveFilename

protected static java.lang.String saveFilename

numberPrefix

protected static int[] numberPrefix

generationMode

private static boolean generationMode

listStates

private static boolean listStates

shagg

private static java.lang.Class shagg
Constructor Detail

Shagg

public Shagg()
Method Detail

initAlgorithms

public static CheckDigitAlgorithm[] initAlgorithms()

abort

public static void abort(java.lang.String message)

print

public static void print(java.lang.String message)

println

public static void println(java.lang.String message)

printFile

public static void printFile(java.lang.String filename)

printAlgorithms

public static void printAlgorithms()

printStates

public static void printStates(java.lang.String filename)

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException