2 * rcracki_mt is a multithreaded implementation and fork of the original
\r
5 * Copyright 2009, 2010 Daniƫl Niggebrugge <niggebrugge@fox-it.com>
\r
6 * Copyright 2009, 2010 James Nobis <frt@quelrod.net>
\r
8 * This file is part of rcracki_mt.
\r
10 * rcracki_mt is free software: you can redistribute it and/or modify
\r
11 * it under the terms of the GNU General Public License as published by
\r
12 * the Free Software Foundation, either version 2 of the License, or
\r
13 * (at your option) any later version.
\r
15 * rcracki_mt is distributed in the hope that it will be useful,
\r
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
18 * GNU General Public License for more details.
\r
20 * You should have received a copy of the GNU General Public License
\r
21 * along with rcracki_mt. If not, see <http://www.gnu.org/licenses/>.
\r
28 #include "ChainWalkContext.h"
\r
30 #include "HashSet.h"
\r
31 //#include <process.h>
\r
32 #include <pthread.h>
\r
37 unsigned char* t_TargetHash;
\r
39 int t_nRainbowChainLen;
\r
40 CChainWalkContext t_cwc;
\r
41 vector<uint64> t_vStartPosIndexE;
\r
44 uint64* t_pStartPosIndexE;
\r
45 int t_nChainWalkStep;
\r
46 bool falseAlarmChecker;
\r
47 bool falseAlarmCheckerO;
\r
48 vector<RainbowChain *> t_pChainsFound;
\r
49 vector<RainbowChainO *> t_pChainsFoundO;
\r
50 vector<int> t_nGuessedPoss;
\r
51 unsigned char* t_pHash;
\r
53 int t_nChainWalkStepDueToFalseAlarm;
\r
60 rcrackiThread(unsigned char* TargetHash, int thread_id, int nRainbowChainLen, int thread_count, uint64* pStartPosIndexE);
\r
61 rcrackiThread(unsigned char* pHash, bool oldFormat = false);
\r
62 rcrackiThread(void);
\r
63 ~rcrackiThread(void);
\r
65 //void SetWork(unsigned char* TargetHash, int nPos, int nRainbowChainLen);
\r
66 //static unsigned __stdcall rcrackiThread::rcrackiThreadStaticEntryPoint(void * pThis);
\r
67 static void * rcrackiThreadStaticEntryPointPthread(void * pThis);
\r
68 int GetIndexCount();
\r
69 int GetChainWalkStep();
\r
70 uint64 GetIndex(int nPos);
\r
72 void AddAlarmCheck(RainbowChain* pChain, int nGuessedPos);
\r
73 void AddAlarmCheckO(RainbowChainO* pChain, int nGuessedPos);
\r
74 int GetChainWalkStepDueToFalseAlarm();
\r
75 int GetnFalseAlarm();
\r
81 void rcrackiThreadEntryPoint();
\r
82 void PreCalculate();
\r