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 com.thehackerschoice.shagg.Shagg
 
algorithm - Variable in class com.thehackerschoice.shagg.State
 
algorithms - Variable in class com.thehackerschoice.shagg.Factory
 
algorithms - Variable in class com.thehackerschoice.shagg.Laboratory
 
amount - Variable in class com.thehackerschoice.shagg.State
 
argv - Variable in class com.thehackerschoice.shagg.util.Getopt
Saved argument list passed to the program

C

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

D

digitRadix - Static variable in class com.thehackerschoice.shagg.Shagg
 

E

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

F

Factory - class com.thehackerschoice.shagg.Factory.
This class is a factory that generates serial numbers.
Factory(String) - Constructor for class com.thehackerschoice.shagg.Factory
Construct a factoy.
failureTolerance - Static variable in class com.thehackerschoice.shagg.Shagg
 
first_nonopt - Variable in class com.thehackerschoice.shagg.util.Getopt
The index of the first non-option in argv[]
flag - Variable in class com.thehackerschoice.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 com.thehackerschoice.shagg.State
Generates a unique id.
generationMode - Static variable in class com.thehackerschoice.shagg.Shagg
 
get(int) - Method in class com.thehackerschoice.shagg.PartitionSet
Get the i-th element of the set.
get(int) - Method in class com.thehackerschoice.shagg.WeightSet
Get the i-th element of the set.
getAlgorithm() - Method in class com.thehackerschoice.shagg.State
Get algorithm of this state.
getAmout() - Method in class com.thehackerschoice.shagg.State
Get amount of serial numbers that were used generarting this state.
getCheckDigitPosition(int) - Method in interface com.thehackerschoice.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 com.thehackerschoice.shagg.algorithms.Modulus10Algorithm
Return the check digit position inside the sequence.
getCheckDigitPosition(int) - Method in class com.thehackerschoice.shagg.algorithms.Modulus10AlgorithmCC
Return the check digit position inside the sequence.
getCheckDigitPosition(int) - Method in class com.thehackerschoice.shagg.algorithms.Modulus11Algorithm
Return the check digit position inside the sequence.
getCheckDigitPosition(int) - Method in class com.thehackerschoice.shagg.algorithms.Modulus7Algorithm
Return the check digit position inside the sequence.
getCheckDigitPosition(int) - Method in class com.thehackerschoice.shagg.algorithms.Modulus9Algorithm
Return the check digit position inside the sequence.
getFlag() - Method in class com.thehackerschoice.shagg.util.LongOpt
Returns the value of the 'flag' field for this long option
getHasArg() - Method in class com.thehackerschoice.shagg.util.LongOpt
Returns the value set for the 'has_arg' field for this long option
getHits() - Method in class com.thehackerschoice.shagg.State
Get hit counter.
getId() - Method in class com.thehackerschoice.shagg.State
Get the unique id of this state.
getLength() - Method in class com.thehackerschoice.shagg.State
Get length of serial number.
getLongind() - Method in class com.thehackerschoice.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 com.thehackerschoice.shagg.algorithms.CheckDigitAlgorithm
Get the name of the implemented check digit algorithm.
getName() - Method in class com.thehackerschoice.shagg.algorithms.Modulus10Algorithm
Get the name of the implemented check digit algorithm, Modulus 10.
getName() - Method in class com.thehackerschoice.shagg.algorithms.Modulus11Algorithm
Get the name of the implemented check digit algorithm, Modulus 11.
getName() - Method in class com.thehackerschoice.shagg.algorithms.Modulus7Algorithm
Get the name of the implemented check digit algorithm, Modulus 7.
getName() - Method in class com.thehackerschoice.shagg.algorithms.Modulus9Algorithm
Get the name of the implemented check digit algorithm, Modulus 9.
getName() - Method in class com.thehackerschoice.shagg.util.LongOpt
Returns the name of this LongOpt as a String
Getopt - class com.thehackerschoice.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 com.thehackerschoice.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 com.thehackerschoice.shagg.util.Getopt
Construct a basic Getopt instance with the given input data.
Getopt(String, String[], String, LongOpt[]) - Constructor for class com.thehackerschoice.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 com.thehackerschoice.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 com.thehackerschoice.shagg.util.Getopt
For communication from `getopt' to the caller.
getOptind() - Method in class com.thehackerschoice.shagg.util.Getopt
optind it the index in ARGV of the next element to be scanned.
getOptopt() - Method in class com.thehackerschoice.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 com.thehackerschoice.shagg.State
Get partition of this state.
getSymbol() - Method in interface com.thehackerschoice.shagg.algorithms.CheckDigitAlgorithm
Get the symbol of the implemented check digit algorithm.
getSymbol() - Method in class com.thehackerschoice.shagg.algorithms.Modulus10Algorithm
Get the symbol of the implemented check digit algorithm.
getSymbol() - Method in class com.thehackerschoice.shagg.algorithms.Modulus11Algorithm
Get the symbol of the implemented check digit algorithm.
getSymbol() - Method in class com.thehackerschoice.shagg.algorithms.Modulus7Algorithm
Get the symbol of the implemented check digit algorithm.
getSymbol() - Method in class com.thehackerschoice.shagg.algorithms.Modulus9Algorithm
Get the symbol of the implemented check digit algorithm.
getVal() - Method in class com.thehackerschoice.shagg.util.LongOpt
Returns the value of the 'val' field for this long option
getWeights() - Method in class com.thehackerschoice.shagg.State
Get weights of this state.

H

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

I

id - Variable in class com.thehackerschoice.shagg.State
 
initAlgorithms() - Static method in class com.thehackerschoice.shagg.Shagg
 

L

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

M

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

N

name - Variable in class com.thehackerschoice.shagg.util.LongOpt
The name of the long option
nextchar - Variable in class com.thehackerschoice.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 com.thehackerschoice.shagg.util.LongOpt
Constant value used for the "has_arg" constructor argument.
numberPrefix - Static variable in class com.thehackerschoice.shagg.Shagg
 
numbers - Variable in class com.thehackerschoice.shagg.Factory
 
numbersToGenerate - Static variable in class com.thehackerschoice.shagg.Shagg
 

O

optarg - Variable in class com.thehackerschoice.shagg.util.Getopt
For communication from `getopt' to the caller.
opterr - Variable in class com.thehackerschoice.shagg.util.Getopt
Callers store false here to inhibit the error message for unrecognized options.
optind - Variable in class com.thehackerschoice.shagg.util.Getopt
Index in ARGV of the next element to be scanned.
OPTIONAL_ARGUMENT - Static variable in class com.thehackerschoice.shagg.util.LongOpt
Constant value used for the "has_arg" constructor argument.
optopt - Variable in class com.thehackerschoice.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 com.thehackerschoice.shagg.util.Getopt
This is the string describing the valid short options.
ordering - Variable in class com.thehackerschoice.shagg.util.Getopt
Determines whether we permute arguments or not

P

partition - Variable in class com.thehackerschoice.shagg.State
 
partitionSet - Variable in class com.thehackerschoice.shagg.Laboratory
 
PartitionSet - class com.thehackerschoice.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 com.thehackerschoice.shagg.PartitionSet
Construct a partition set.
PATH - Static variable in class com.thehackerschoice.shagg.util.Getopt
 
PERMUTE - Static variable in class com.thehackerschoice.shagg.util.Getopt
PERMUTE is the default.
posixly_correct - Variable in class com.thehackerschoice.shagg.util.Getopt
The flag determines whether or not we operate in strict POSIX compliance
prefix - Variable in class com.thehackerschoice.shagg.Factory
 
print(CheckDigitAlgorithm[]) - Method in class com.thehackerschoice.shagg.State
Print state.
print(String) - Static method in class com.thehackerschoice.shagg.Shagg
 
printAlgorithms() - Static method in class com.thehackerschoice.shagg.Shagg
 
printFile(String) - Static method in class com.thehackerschoice.shagg.Shagg
 
println(String) - Static method in class com.thehackerschoice.shagg.Shagg
 
printStates(String) - Static method in class com.thehackerschoice.shagg.Shagg
 
progname - Variable in class com.thehackerschoice.shagg.util.Getopt
Name to print as the program name in error messages.

R

randomNumber() - Method in class com.thehackerschoice.shagg.Factory
Generate a random number.
README_FILE - Static variable in class com.thehackerschoice.shagg.Shagg
 
readSerialNumberFile(String) - Method in class com.thehackerschoice.shagg.Laboratory
Read all numbers from the given file.
REQUIRE_ORDER - Static variable in class com.thehackerschoice.shagg.util.Getopt
Describe how to deal with options that follow non-option ARGV-elements.
REQUIRED_ARGUMENT - Static variable in class com.thehackerschoice.shagg.util.LongOpt
Constant value used for the "has_arg" constructor argument.
RETURN_IN_ORDER - Static variable in class com.thehackerschoice.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 com.thehackerschoice.shagg.State
Save a state to a file.
saveFilename - Static variable in class com.thehackerschoice.shagg.Shagg
 
saveVector(String, Vector) - Static method in class com.thehackerschoice.shagg.State
Save a vector of states to a file.
serialNumberLen - Static variable in class com.thehackerschoice.shagg.Shagg
 
serialNumbers - Variable in class com.thehackerschoice.shagg.Laboratory
 
set - Variable in class com.thehackerschoice.shagg.PartitionSet
 
set - Variable in class com.thehackerschoice.shagg.WeightSet
 
setArgv(String[]) - Method in class com.thehackerschoice.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 com.thehackerschoice.shagg.util.Getopt
Normally Getopt will print a message to the standard error when an invalid option is encountered.
setOptind(int) - Method in class com.thehackerschoice.shagg.util.Getopt
This method allows the optind index to be set manually.
setOptstring(String) - Method in class com.thehackerschoice.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 com.thehackerschoice.shagg.Shagg
 
Shagg - class com.thehackerschoice.shagg.Shagg.
THC-Shagg is a modular application to break serial numbers that use known check digit algorithms.
Shagg() - Constructor for class com.thehackerschoice.shagg.Shagg
 
size() - Method in class com.thehackerschoice.shagg.PartitionSet
Get the size of the set.
size() - Method in class com.thehackerschoice.shagg.WeightSet
Get the size of the set.
State - class com.thehackerschoice.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 com.thehackerschoice.shagg.State
Construct a state.
states - Variable in class com.thehackerschoice.shagg.Factory
 

T

type - Variable in class com.thehackerschoice.shagg.algorithms.Modulus10Algorithm
 

U

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

V

val - Variable in class com.thehackerschoice.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 com.thehackerschoice.shagg.Shagg
 
VERSION_FILE - Static variable in class com.thehackerschoice.shagg.Shagg
 

W

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

_

_messages - Variable in class com.thehackerschoice.shagg.util.Getopt
The localized strings are kept in a separate file
_messages - Variable in class com.thehackerschoice.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 _