//Part of Laverna's Brute #include "ProcessingPath.h" //////////////////////////////////////////// // Initialize our static variables ///////// //////////////////////////////////////////// boost::unordered_map processingPath::targets; boost::mutex processingPath::targetsMutex; int processingPath::maxChars = 0; int processingPath::numWorkers = 0; //////////////////////////////////////////// processingPath::processingPath() { charset = masterThread::getCharset(); charsetLength = masterThread::getCharsetLength(); //Make sure the keyspace size is within the supported limits if(maxChars < 1 || maxChars > 14) { maxChars = 8; } numWorkers = masterThread::getNumWorkers(); } processingPath::~processingPath() { } void processingPath::pushTarget(std::string input) { NTLM ntlm; targets[ntlm.weakenHash(input)] = input; } void processingPath::setMaxChars(int input) { maxChars = input; } int processingPath::getMaxChars() { return maxChars; } int processingPath::getNumTargets() { return (int)targets.size(); } void processingPath::removeTarget(boost::unordered_map::iterator it) { boost::mutex::scoped_lock lock(targetsMutex); targets.erase(it); }