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
Constructor Summary |
Shagg()
|
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
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
Shagg
public Shagg()
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