X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Client%20Applications%2Frcracki_mt%2FChainWalkSet.h;h=3c29bcf64ea13f044d3322c5c2a2ceb2659d3873;hb=ce75ca839a9cd1863ea13636ffebf7ee1dcc4267;hp=05622cfd8e867c728b41e5558276758d8ad2b217;hpb=4d512f6f97940c2f10ab435ef017e39cdc69837a;p=freerainbowtables diff --git a/Client Applications/rcracki_mt/ChainWalkSet.h b/Client Applications/rcracki_mt/ChainWalkSet.h index 05622cf..3c29bcf 100644 --- a/Client Applications/rcracki_mt/ChainWalkSet.h +++ b/Client Applications/rcracki_mt/ChainWalkSet.h @@ -1,58 +1,77 @@ -/* - RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique. - - Copyright (C) Zhu Shuanglei -*/ - -#ifndef _CHAINWALKSET_H -#define _CHAINWALKSET_H - -#include "Public.h" - -struct ChainWalk -{ - unsigned char Hash[MAX_HASH_LEN]; - //int nHashLen; // Implied - uint64* pIndexE; // mapStartPosIndexE, Len = nRainbowChainLen - 1 -}; - -class CChainWalkSet -{ -public: - CChainWalkSet(); - virtual ~CChainWalkSet(); - -private: - string m_sHashRoutineName; // Discard all if not match - string m_sPlainCharsetName; // Discard all if not match - int m_nPlainLenMin; // Discard all if not match - int m_nPlainLenMax; // Discard all if not match - int m_nRainbowTableIndex; // Discard all if not match - int m_nRainbowChainLen; // Discard all if not match - list m_lChainWalk; - bool debug; - string sPrecalcPathName; - int preCalcPart; - vector vPrecalcFiles; - -private: - void DiscardAll(); - bool FindInFile(uint64* pIndexE, unsigned char* pHash, int nHashLen); - string CheckOrRotatePreCalcFile(); - void updateUsedPrecalcFiles(); - -public: - uint64* RequestWalk(unsigned char* pHash, int nHashLen, - string sHashRoutineName, - string sPlainCharsetName, int nPlainLenMin, int nPlainLenMax, - int nRainbowTableIndex, - int nRainbowChainLen, - bool& fNewlyGenerated, - bool setDebug, - string sPrecalc); - void DiscardWalk(uint64* pIndexE); - void StoreToFile(uint64* pIndexE, unsigned char* pHash, int nHashLen); - void removePrecalcFiles(); -}; - -#endif +/* + * rcracki_mt is a multithreaded implementation and fork of the original + * RainbowCrack + * + * Copyright (C) Zhu Shuanglei + * Copyright Martin Westergaard Jørgensen + * Copyright 2009, 2010 Daniël Niggebrugge + * Copyright 2009, 2010 James Nobis + * + * This file is part of racrcki_mt. + * + * rcracki_mt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * rcracki_mt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rcracki_mt. If not, see . + */ + +#ifndef _CHAINWALKSET_H +#define _CHAINWALKSET_H + +#include "Public.h" + +struct ChainWalk +{ + unsigned char Hash[MAX_HASH_LEN]; + //int nHashLen; // Implied + uint64* pIndexE; // mapStartPosIndexE, Len = nRainbowChainLen - 1 +}; + +class CChainWalkSet +{ +public: + CChainWalkSet(); + virtual ~CChainWalkSet(); + +private: + string m_sHashRoutineName; // Discard all if not match + string m_sPlainCharsetName; // Discard all if not match + int m_nPlainLenMin; // Discard all if not match + int m_nPlainLenMax; // Discard all if not match + int m_nRainbowTableIndex; // Discard all if not match + int m_nRainbowChainLen; // Discard all if not match + list m_lChainWalk; + bool debug; + string sPrecalcPathName; + int preCalcPart; + vector vPrecalcFiles; + +private: + void DiscardAll(); + bool FindInFile(uint64* pIndexE, unsigned char* pHash, int nHashLen); + string CheckOrRotatePreCalcFile(); + void updateUsedPrecalcFiles(); + +public: + uint64* RequestWalk(unsigned char* pHash, int nHashLen, + string sHashRoutineName, + string sPlainCharsetName, int nPlainLenMin, int nPlainLenMax, + int nRainbowTableIndex, + int nRainbowChainLen, + bool& fNewlyGenerated, + bool setDebug, + string sPrecalc); + void DiscardWalk(uint64* pIndexE); + void StoreToFile(uint64* pIndexE, unsigned char* pHash, int nHashLen); + void removePrecalcFiles(); +}; + +#endif