A C D E F G H I L M N O P R S T U V W _

A

abort(String) - Static method in class org.thc.shagg.Shagg
 
algorithm - Variable in class org.thc.shagg.State
 
algorithms - Variable in class org.thc.shagg.Factory
 
algorithms - Variable in class org.thc.shagg.Laboratory
 
amount - Variable in class org.thc.shagg.State
 
argv - Variable in class org.thc.shagg.util.Getopt
Saved argument list passed to the program

C

check(int[], CheckDigitAlgorithm[]) - Method in class org.thc.shagg.State
Checks a serial number against the data from this state.
check(int[], int[]) - Method in interface org.thc.shagg.algorithms.CheckDigitAlgorithm
Checks if the supplied sequence matches the algorithm.
check(int[], int[]) - Method in class org.thc.shagg.algorithms.Modulus10Algorithm
Checks if the supplied sequence matches the Modulus 10 Algorithm.
check(int[], int[]) - Method in class org.thc.shagg.algorithms.Modulus10AlgorithmCC
Checks if the supplied sequence matches the Modulus 10 Algorithm.
check(int[], int[]) - Method in class org.thc.shagg.algorithms.Modulus11Algorithm
Checks if the supplied sequence matches the Modulus 11 Algorithm.
check(int[], int[]) - Method in class org.thc.shagg.algorithms.Modulus7Algorithm
Checks if the supplied sequence matches the Modulus 7 Algorithm.
check(int[], int[]) - Method in class org.thc.shagg.algorithms.Modulus9Algorithm
Checks if the supplied sequence matches the Modulus 9 Algorithm.
CheckDigitAlgorithm - interface org.thc.shagg.algorithms.CheckDigitAlgorithm.
Basic method definitions for a check digit algorithm.
checkLongOption() - Method in class org.thc.shagg.util.Getopt
Check to see if an option is a valid long option.
clear(Map, int) - Static method in class org.thc.shagg.State
Clear map from states that don't have enough hits.
compareTo(Object) - Method in class org.thc.shagg.State
Compares two states.

D

digitRadix - Static variable in class org.thc.shagg.Shagg
 

E

endparse - Variable in class org.thc.shagg.util.Getopt
Flag to tell getopt to immediately return -1 the next time it is called.
equals(State) - Method in class org.thc.shagg.State
Check if two states are equal.
exchange(String[]) - Method in class org.thc.shagg.util.Getopt
Exchange the shorter segment with the far end of the longer segment.

F

Factory - class org.thc.shagg.Factory.
This class is a factory that generates serial numbers.
Factory(String) - Constructor for class org.thc.shagg.Factory
Construct a factoy.
failureTolerance - Static variable in class org.thc.shagg.Shagg
 
first_nonopt - Variable in class org.thc.shagg.util.Getopt
The index of the first non-option in argv[]
flag - Variable in class org.thc.shagg.util.LongOpt
If this variable is not null, then the value stored in "val" is stored here when this long option is encountered.

G

generateUniqueId() - Method in class org.thc.shagg.State
Generates a unique id.
generationMode - Static variable in class org.thc.shagg.Shagg
 
get(int) - Method in class org.thc.shagg.PartitionSet
Get the i-th element of the set.
get(int) - Method in class org.thc.shagg.WeightSet
Get the i-th element of the set.
getAlgorithm() - Method in class org.thc.shagg.State
Get algorithm of this state.
getAmout() - Method in class org.thc.shagg.State
Get amount of serial numbers that were used generarting this state.
getCheckDigitPosition(int) - Method in interface org.thc.shagg.algorithms.CheckDigitAlgorithm
Return the check digit position inside the sequence or -1 if no check digit is taken from the sequence.
getCheckDigitPosition(int) - Method in class org.thc.shagg.algorithms.Modulus10Algorithm
Return the check digit position inside the sequence.
getCheckDigitPosition(int) - Method in class org.thc.shagg.algorithms.Modulus10AlgorithmCC
Return the check digit position inside the sequence.
getCheckDigitPosition(int) - Method in class org.thc.shagg.algorithms.Modulus11Algorithm
Return the check digit position inside the sequence.
getCheckDigitPosition(int) - Method in class org.thc.shagg.algorithms.Modulus7Algorithm
Return the check digit position inside the sequence.
getCheckDigitPosition(int) - Method in class org.thc.shagg.algorithms.Modulus9Algorithm
Return the check digit position inside the sequence.
getFlag() - Method in class org.thc.shagg.util.LongOpt
Returns the value of the 'flag' field for this long option
getHasArg() - Method in class org.thc.shagg.util.LongOpt
Returns the value set for the 'has_arg' field for this long option
getHits() - Method in class org.thc.shagg.State
Get hit counter.
getId() - Method in class org.thc.shagg.State
Get the unique id of this state.
getLength() - Method in class org.thc.shagg.State
Get length of serial number.
getLongind() - Method in class org.thc.shagg.util.Getopt
Returns the index into the array of long options (NOT argv) representing the long option that was found.
getName() - Method in interface org.thc.shagg.algorithms.CheckDigitAlgorithm
Get the name of the implemented check digit algorithm.
getName() - Method in class org.thc.shagg.algorithms.Modulus10Algorithm
Get the name of the implemented check digit algorithm, Modulus 10.
getName() - Method in class org.thc.shagg.algorithms.Modulus11Algorithm
Get the name of the implemented check digit algorithm, Modulus 11.
getName() - Method in class org.thc.shagg.algorithms.Modulus7Algorithm
Get the name of the implemented check digit algorithm, Modulus 7.
getName() - Method in class org.thc.shagg.algorithms.Modulus9Algorithm
Get the name of the implemented check digit algorithm, Modulus 9.
getName() - Method in class org.thc.shagg.util.LongOpt
Returns the name of this LongOpt as a String
Getopt - class org.thc.shagg.util.Getopt.
This is a Java port of GNU getopt, a class for parsing command line arguments passed to programs.
getopt() - Method in class org.thc.shagg.util.Getopt
This method returns a char that is the current option that has been parsed from the command line.
Getopt(String, String[], String) - Constructor for class org.thc.shagg.util.Getopt
Construct a basic Getopt instance with the given input data.
Getopt(String, String[], String, LongOpt[]) - Constructor for class org.thc.shagg.util.Getopt
Construct a Getopt instance with given input data that is capable of parsing long options as well as short.
Getopt(String, String[], String, LongOpt[], boolean) - Constructor for class org.thc.shagg.util.Getopt
Construct a Getopt instance with given input data that is capable of parsing long options and short options.
getOptarg() - Method in class org.thc.shagg.util.Getopt
For communication from `getopt' to the caller.
getOptind() - Method in class org.thc.shagg.util.Getopt
optind it the index in ARGV of the next element to be scanned.
getOptopt() - Method in class org.thc.shagg.util.Getopt
When getopt() encounters an invalid option, it stores the value of that option in optopt which can be retrieved with this method.
getPartition() - Method in class org.thc.shagg.State
Get partition of this state.
getSymbol() - Method in interface org.thc.shagg.algorithms.CheckDigitAlgorithm
Get the symbol of the implemented check digit algorithm.
getSymbol() - Method in class org.thc.shagg.algorithms.Modulus10Algorithm
Get the symbol of the implemented check digit algorithm.
getSymbol() - Method in class org.thc.shagg.algorithms.Modulus11Algorithm
Get the symbol of the implemented check digit algorithm.
getSymbol() - Method in class org.thc.shagg.algorithms.Modulus7Algorithm
Get the symbol of the implemented check digit algorithm.
getSymbol() - Method in class org.thc.shagg.algorithms.Modulus9Algorithm
Get the symbol of the implemented check digit algorithm.
getVal() - Method in class org.thc.shagg.util.LongOpt
Returns the value of the 'val' field for this long option
getWeights() - Method in class org.thc.shagg.State
Get weights of this state.

H

has_arg - Variable in class org.thc.shagg.util.LongOpt
Indicates whether the option has no argument, a required argument, or an optional argument.
hit() - Method in class org.thc.shagg.State
Hit! Increase hit counter.
hit(Map) - Method in class org.thc.shagg.State
Find a state in a map and give it a hit.
hits - Variable in class org.thc.shagg.State
 

I

id - Variable in class org.thc.shagg.State
 
initAlgorithms() - Static method in class org.thc.shagg.Shagg
 

L

Laboratory - class org.thc.shagg.Laboratory.
This class is the laboratoy of THC-Shagg.
Laboratory(String) - Constructor for class org.thc.shagg.Laboratory
Construct a shaggadalic object using the serial numbers from the provided file.
last_nonopt - Variable in class org.thc.shagg.util.Getopt
The index of the last non-option in argv[]
length - Variable in class org.thc.shagg.Factory
 
listStates - Static variable in class org.thc.shagg.Shagg
 
load(String) - Static method in class org.thc.shagg.State
Load a state from a file.
loadVector(String) - Static method in class org.thc.shagg.State
Load vector of states from a file.
long_only - Variable in class org.thc.shagg.util.Getopt
This flag determines whether or not we are parsing only long args
long_options - Variable in class org.thc.shagg.util.Getopt
This is an array of LongOpt objects which describ the valid long options.
longind - Variable in class org.thc.shagg.util.Getopt
Stores the index into the long_options array of the long option found
LongOpt - class org.thc.shagg.util.LongOpt.
This object represents the definition of a long option in the Java port of GNU getopt.
longopt_handled - Variable in class org.thc.shagg.util.Getopt
A flag which communicates whether or not checkLongOption() did all necessary processing for the current option
LongOpt(String, int, StringBuffer, int) - Constructor for class org.thc.shagg.util.LongOpt
Create a new LongOpt object with the given parameter values.

M

main(String[]) - Static method in class org.thc.shagg.Shagg
 
maxPrintedStates - Static variable in class org.thc.shagg.Shagg
 
maxStatesUncleared - Static variable in class org.thc.shagg.Shagg
 
maxWeightsLen - Static variable in class org.thc.shagg.Shagg
 
minPartitionLen - Static variable in class org.thc.shagg.Shagg
 
minSerialNumbers - Static variable in class org.thc.shagg.Shagg
 
mod10Add(int[], int[], int) - Method in class org.thc.shagg.algorithms.Modulus10Algorithm
Add method for the Modulus 10 Algorithm.
mod10Add(int[], int[], int) - Method in class org.thc.shagg.algorithms.Modulus10AlgorithmBasic
Add method for the Modulus 10 Algorithm.
mod10Add(int[], int[], int) - Method in class org.thc.shagg.algorithms.Modulus10AlgorithmLuhn
Add method for the Modulus 10 Algorithm.
mod10checkDigit(int[]) - Method in class org.thc.shagg.algorithms.Modulus10Algorithm
Check method for the Modulus 10 Algorithm.
mod10checkDigit(int[]) - Method in class org.thc.shagg.algorithms.Modulus10AlgorithmBasic
Check method for the Modulus 10 Algorithm.
mod10checkDigit(int[]) - Method in class org.thc.shagg.algorithms.Modulus10AlgorithmCC
The result of the modulus operation is compared to 0 in all cases.
mod10checkDigit(int[]) - Method in class org.thc.shagg.algorithms.Modulus10AlgorithmLuhn
Check method for the Modulus 10 Algorithm.
Modulus10Algorithm - class org.thc.shagg.algorithms.Modulus10Algorithm.
Abstract class for the Modulus 10 Algorithm.
Modulus10Algorithm() - Constructor for class org.thc.shagg.algorithms.Modulus10Algorithm
 
Modulus10AlgorithmBasic - class org.thc.shagg.algorithms.Modulus10AlgorithmBasic.
The basic or typical implementation of the Modulus 10 Algorithm.
Modulus10AlgorithmBasic() - Constructor for class org.thc.shagg.algorithms.Modulus10AlgorithmBasic
 
Modulus10AlgorithmCC - class org.thc.shagg.algorithms.Modulus10AlgorithmCC.
The algorithm used in Credit Cards is claimed to be the Luhn Algorithm.
Modulus10AlgorithmCC() - Constructor for class org.thc.shagg.algorithms.Modulus10AlgorithmCC
Init the Modulus 10 CC Algorithm.
Modulus10AlgorithmLuhn - class org.thc.shagg.algorithms.Modulus10AlgorithmLuhn.
This is "my" definition of the Luhn Algorithm.
Modulus10AlgorithmLuhn() - Constructor for class org.thc.shagg.algorithms.Modulus10AlgorithmLuhn
 
Modulus11Algorithm - class org.thc.shagg.algorithms.Modulus11Algorithm.
Implementation of the Modulus 11 Algorithm commonly used in the ISBN and EAN numbers.
Modulus11Algorithm() - Constructor for class org.thc.shagg.algorithms.Modulus11Algorithm
 
Modulus7Algorithm - class org.thc.shagg.algorithms.Modulus7Algorithm.
Implementation of the Modulus 7/9 Algorithm.
Modulus7Algorithm() - Constructor for class org.thc.shagg.algorithms.Modulus7Algorithm
 
Modulus9Algorithm - class org.thc.shagg.algorithms.Modulus9Algorithm.
Implementation of the Modulus 7/9 Algorithm.
Modulus9Algorithm() - Constructor for class org.thc.shagg.algorithms.Modulus9Algorithm
 

N

name - Variable in class org.thc.shagg.util.LongOpt
The name of the long option
nextchar - Variable in class org.thc.shagg.util.Getopt
The next char to be scanned in the option-element in which the last option character we returned was found.
NO_ARGUMENT - Static variable in class org.thc.shagg.util.LongOpt
Constant value used for the "has_arg" constructor argument.
numberPrefix - Static variable in class org.thc.shagg.Shagg
 
numbers - Variable in class org.thc.shagg.Factory
 
numbersToGenerate - Static variable in class org.thc.shagg.Shagg
 

O

optarg - Variable in class org.thc.shagg.util.Getopt
For communication from `getopt' to the caller.
opterr - Variable in class org.thc.shagg.util.Getopt
Callers store false here to inhibit the error message for unrecognized options.
optind - Variable in class org.thc.shagg.util.Getopt
Index in ARGV of the next element to be scanned.
OPTIONAL_ARGUMENT - Static variable in class org.thc.shagg.util.LongOpt
Constant value used for the "has_arg" constructor argument.
optopt - Variable in class org.thc.shagg.util.Getopt
When an unrecognized option is encountered, getopt will return a '?' and store the value of the invalid option here.
optstring - Variable in class org.thc.shagg.util.Getopt
This is the string describing the valid short options.
ordering - Variable in class org.thc.shagg.util.Getopt
Determines whether we permute arguments or not

P

partition - Variable in class org.thc.shagg.State
 
partitionSet - Variable in class org.thc.shagg.Laboratory
 
PartitionSet - class org.thc.shagg.PartitionSet.
This class holds a set of partitions for a specified length, the length of the serial numbers.
PartitionSet(int, int) - Constructor for class org.thc.shagg.PartitionSet
Construct a partition set.
PATH - Static variable in class org.thc.shagg.util.Getopt
 
PERMUTE - Static variable in class org.thc.shagg.util.Getopt
PERMUTE is the default.
posixly_correct - Variable in class org.thc.shagg.util.Getopt
The flag determines whether or not we operate in strict POSIX compliance
prefix - Variable in class org.thc.shagg.Factory
 
print(CheckDigitAlgorithm[]) - Method in class org.thc.shagg.State
Print state.
print(String) - Static method in class org.thc.shagg.Shagg
 
printAlgorithms() - Static method in class org.thc.shagg.Shagg
 
printFile(String) - Static method in class org.thc.shagg.Shagg
 
println(String) - Static method in class org.thc.shagg.Shagg
 
printStates(String) - Static method in class org.thc.shagg.Shagg
 
progname - Variable in class org.thc.shagg.util.Getopt
Name to print as the program name in error messages.

R

randomNumber() - Method in class org.thc.shagg.Factory
Generate a random number.
README_FILE - Static variable in class org.thc.shagg.Shagg
 
readSerialNumberFile(String) - Method in class org.thc.shagg.Laboratory
Read all numbers from the given file.
REQUIRE_ORDER - Static variable in class org.thc.shagg.util.Getopt
Describe how to deal with options that follow non-option ARGV-elements.
REQUIRED_ARGUMENT - Static variable in class org.thc.shagg.util.LongOpt
Constant value used for the "has_arg" constructor argument.
RETURN_IN_ORDER - Static variable in class org.thc.shagg.util.Getopt
RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two.

S

save(String) - Method in class org.thc.shagg.State
Save a state to a file.
saveFilename - Static variable in class org.thc.shagg.Shagg
 
saveVector(String, Vector) - Static method in class org.thc.shagg.State
Save a vector of states to a file.
serialNumberLen - Static variable in class org.thc.shagg.Shagg
 
serialNumbers - Variable in class org.thc.shagg.Laboratory
 
set - Variable in class org.thc.shagg.PartitionSet
 
set - Variable in class org.thc.shagg.WeightSet
 
setArgv(String[]) - Method in class org.thc.shagg.util.Getopt
Since in GNU getopt() the argument vector is passed back in to the function every time, the caller can swap out argv on the fly.
setOpterr(boolean) - Method in class org.thc.shagg.util.Getopt
Normally Getopt will print a message to the standard error when an invalid option is encountered.
setOptind(int) - Method in class org.thc.shagg.util.Getopt
This method allows the optind index to be set manually.
setOptstring(String) - Method in class org.thc.shagg.util.Getopt
In GNU getopt, it is possible to change the string containg valid options on the fly because it is passed as an argument to getopt() each time.
shagg - Static variable in class org.thc.shagg.Shagg
 
Shagg - class org.thc.shagg.Shagg.
THC-Shagg is a modular application to break serial numbers that use known check digit algorithms.
Shagg() - Constructor for class org.thc.shagg.Shagg
 
size() - Method in class org.thc.shagg.PartitionSet
Get the size of the set.
size() - Method in class org.thc.shagg.WeightSet
Get the size of the set.
State - class org.thc.shagg.State.
This class represents a state during the analysis of a set of serial a number.
State(int[], int, int[], int) - Constructor for class org.thc.shagg.State
Construct a state.
states - Variable in class org.thc.shagg.Factory
 

T

type - Variable in class org.thc.shagg.algorithms.Modulus10Algorithm
 

U

USAGE_FILE - Static variable in class org.thc.shagg.Shagg
 
usesWeights() - Method in interface org.thc.shagg.algorithms.CheckDigitAlgorithm
Checks if the algorithm uses weights for the check digit calculation.
usesWeights() - Method in class org.thc.shagg.algorithms.Modulus10Algorithm
The Modulus 10 Algorithm uses weights.
usesWeights() - Method in class org.thc.shagg.algorithms.Modulus11Algorithm
The Modulus 11 Algorithm doesn't use weights.
usesWeights() - Method in class org.thc.shagg.algorithms.Modulus7Algorithm
The Modulus 7 Algorithm doesn't use weights.
usesWeights() - Method in class org.thc.shagg.algorithms.Modulus9Algorithm
The Modulus 9 Algorithm doesn't use weights.

V

val - Variable in class org.thc.shagg.util.LongOpt
The value to store in "flag" if flag is not null, otherwise the equivalent short option character for this long option.
verbose - Static variable in class org.thc.shagg.Shagg
 
VERSION_FILE - Static variable in class org.thc.shagg.Shagg
 

W

weights - Variable in class org.thc.shagg.State
 
weightSet - Variable in class org.thc.shagg.Laboratory
 
WeightSet - class org.thc.shagg.WeightSet.
This class holds a set of weights.
WeightSet(int, int) - Constructor for class org.thc.shagg.WeightSet
Construct a weight set.
work() - Method in class org.thc.shagg.Factory
Generate serial numbers.
work() - Method in class org.thc.shagg.Laboratory
Bruteforce through the serial numbers.

_

_messages - Variable in class org.thc.shagg.util.Getopt
The localized strings are kept in a separate file
_messages - Variable in class org.thc.shagg.util.LongOpt
Localized strings for error messages

A C D E F G H I L M N O P R S T U V W _