-#ifdef _WIN32
+/*
+ * rcracki_mt is a multithreaded implementation and fork of the original
+ * RainbowCrack
+ *
+ * Copyright 2009, 2010 Daniƫl Niggebrugge <niggebrugge@fox-it.com>
+ * Copyright 2009, 2010 James Nobis <frt@quelrod.net>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#if defined(_WIN32) && !defined(__GNUC__)
#pragma warning(disable : 4786 4267 4018)
#endif
}
// create job for false alarm checking
-rcrackiThread::rcrackiThread(unsigned char* pHash)
-{
- falseAlarmChecker = true;
- falseAlarmCheckerO = false;
- t_pChainsFound.clear();
- t_nGuessedPoss.clear();
- t_pHash = pHash;
- t_nChainWalkStepDueToFalseAlarm = 0;
- t_nFalseAlarm = 0;
- foundHash = false;
-}
-
-// create job for false alarm checking OLD format
rcrackiThread::rcrackiThread(unsigned char* pHash, bool oldFormat)
{
falseAlarmChecker = true;
- falseAlarmCheckerO = true;
- t_pChainsFoundO.clear();
+ falseAlarmCheckerO = oldFormat;
+ t_pChainsFound.clear();
t_nGuessedPoss.clear();
t_pHash = pHash;
t_nChainWalkStepDueToFalseAlarm = 0;
foundHash = false;
}
-
void rcrackiThread::AddAlarmCheck(RainbowChain* pChain, int nGuessedPos)
{
t_pChainsFound.push_back(pChain);
t_cwc.HashToIndex(t_nPos);
int i;
for (i = t_nPos + 1; i <= t_nRainbowChainLen - 2; i++)
- //for (i = t_nPos + 1; i <= 10; i++)
{
t_cwc.IndexToPlain();
t_cwc.PlainToHash();
void rcrackiThread::CheckAlarm()
{
- int i;
+ UINT4 i;
for (i = 0; i < t_pChainsFound.size(); i++)
{
RainbowChain* t_pChain = t_pChainsFound[i];
void rcrackiThread::CheckAlarmO()
{
- int i;
+ UINT4 i;
for (i = 0; i < t_pChainsFoundO.size(); i++)
{
RainbowChainO* t_pChain = t_pChainsFoundO[i];