X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Client%20Applications%2Frcracki_mt%2FrcrackiThread.h;h=37fa28915d966e9bf17e763eaf894fd8b8477fe1;hb=b4f4ccaa2beec25aefe63647cbcf4321736c8f69;hp=a53cac24702cb02f5c597ebb7cacb8c47aba3a57;hpb=8ce05994bc4ebc6a3dd765bb3dc72e3e15a4e6b1;p=freerainbowtables diff --git a/Client Applications/rcracki_mt/rcrackiThread.h b/Client Applications/rcracki_mt/rcrackiThread.h index a53cac2..37fa289 100644 --- a/Client Applications/rcracki_mt/rcrackiThread.h +++ b/Client Applications/rcracki_mt/rcrackiThread.h @@ -1,85 +1,85 @@ -/* - * rcracki_mt is a multithreaded implementation and fork of the original - * RainbowCrack - * - * Copyright 2009, 2010 Daniël Niggebrugge - * Copyright 2009, 2010 James Nobis - * - * This file is part of rcracki_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 . - */ - -#ifdef _WIN32 - #pragma once -#endif - -#include "ChainWalkContext.h" -#include "Public.h" -#include "HashSet.h" -//#include -#include - -class rcrackiThread -{ -private: - unsigned char* t_TargetHash; - int t_nPos; - int t_nRainbowChainLen; - CChainWalkContext t_cwc; - vector t_vStartPosIndexE; - int t_ID; - int t_count; - uint64* t_pStartPosIndexE; - int t_nChainWalkStep; - bool falseAlarmChecker; - bool falseAlarmCheckerO; - vector t_pChainsFound; - vector t_pChainsFoundO; - vector t_nGuessedPoss; - unsigned char* t_pHash; - bool foundHash; - int t_nChainWalkStepDueToFalseAlarm; - int t_nFalseAlarm; - string t_Hash; - string t_Plain; - string t_Binary; - -public: - rcrackiThread(unsigned char* TargetHash, int thread_id, int nRainbowChainLen, int thread_count, uint64* pStartPosIndexE); - rcrackiThread(unsigned char* pHash, bool oldFormat = false); - rcrackiThread(void); - ~rcrackiThread(void); - - //void SetWork(unsigned char* TargetHash, int nPos, int nRainbowChainLen); - //static unsigned __stdcall rcrackiThread::rcrackiThreadStaticEntryPoint(void * pThis); - static void * rcrackiThreadStaticEntryPointPthread(void * pThis); - int GetIndexCount(); - int GetChainWalkStep(); - uint64 GetIndex(int nPos); - bool FoundHash(); - void AddAlarmCheck(RainbowChain* pChain, int nGuessedPos); - void AddAlarmCheckO(RainbowChainO* pChain, int nGuessedPos); - int GetChainWalkStepDueToFalseAlarm(); - int GetnFalseAlarm(); - string GetHash(); - string GetPlain(); - string GetBinary(); - -private: - void rcrackiThreadEntryPoint(); - void PreCalculate(); - void CheckAlarm(); - void CheckAlarmO(); -}; +/* + * rcracki_mt is a multithreaded implementation and fork of the original + * RainbowCrack + * + * Copyright 2009, 2010 Daniël Niggebrugge + * Copyright 2009, 2010 James Nobis + * + * This file is part of rcracki_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 . + */ + +#ifdef _WIN32 + #pragma once +#endif + +#include "ChainWalkContext.h" +#include "Public.h" +#include "HashSet.h" +//#include +#include + +class rcrackiThread +{ +private: + unsigned char* t_TargetHash; + int t_nPos; + int t_nRainbowChainLen; + CChainWalkContext t_cwc; + vector t_vStartPosIndexE; + int t_ID; + int t_count; + uint64* t_pStartPosIndexE; + int t_nChainWalkStep; + bool falseAlarmChecker; + bool falseAlarmCheckerO; + vector t_pChainsFound; + vector t_pChainsFoundO; + vector t_nGuessedPoss; + unsigned char* t_pHash; + bool foundHash; + int t_nChainWalkStepDueToFalseAlarm; + int t_nFalseAlarm; + string t_Hash; + string t_Plain; + string t_Binary; + +public: + rcrackiThread(unsigned char* TargetHash, int thread_id, int nRainbowChainLen, int thread_count, uint64* pStartPosIndexE); + rcrackiThread(unsigned char* pHash, bool oldFormat = false); + rcrackiThread(void); + ~rcrackiThread(void); + + //void SetWork(unsigned char* TargetHash, int nPos, int nRainbowChainLen); + //static unsigned __stdcall rcrackiThread::rcrackiThreadStaticEntryPoint(void * pThis); + static void * rcrackiThreadStaticEntryPointPthread(void * pThis); + int GetIndexCount(); + int GetChainWalkStep(); + uint64 GetIndex(int nPos); + bool FoundHash(); + void AddAlarmCheck(RainbowChain* pChain, int nGuessedPos); + void AddAlarmCheckO(RainbowChainO* pChain, int nGuessedPos); + int GetChainWalkStepDueToFalseAlarm(); + int GetnFalseAlarm(); + string GetHash(); + string GetPlain(); + string GetBinary(); + +private: + void rcrackiThreadEntryPoint(); + void PreCalculate(); + void CheckAlarm(); + void CheckAlarmO(); +};