/*
- RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
-
- Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
-*/
-
-#ifdef _WIN32
+ * rcracki_mt is a multithreaded implementation and fork of the original
+ * RainbowCrack
+ *
+ * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
+ * Copyright Martin Westergaard Jørgensen <martinwj2005@gmail.com>
+ * 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
if (sHash == "aad3b435b51404ee")
return;
- int i;
+ UINT4 i;
for (i = 0; i < m_vHash.size(); i++)
{
if (m_vHash[i] == sHash)
bool CHashSet::AnyhashLeft()
{
- int i;
+ UINT4 i;
for (i = 0; i < m_vHash.size(); i++)
{
if (!m_vFound[i])
bool CHashSet::AnyHashLeftWithLen(int nLen)
{
- int i;
+ UINT4 i;
for (i = 0; i < m_vHash.size(); i++)
{
if (!m_vFound[i])
- if (m_vHash[i].size() == nLen * 2)
+ if (m_vHash[i].size() == (unsigned long)nLen * 2)
return true;
}
{
vHash.clear();
- int i;
+ UINT4 i;
for (i = 0; i < m_vHash.size(); i++)
{
if (!m_vFound[i])
- if (m_vHash[i].size() == nLen * 2)
+ if (m_vHash[i].size() == (unsigned long)nLen * 2)
vHash.push_back(m_vHash[i]);
}
}
void CHashSet::AddHashInfo(string sHash, bool found, string sPlain, string sBinary)
{
- int i;
+ UINT4 i;
for (i = 0; i < m_vHash.size(); i++)
{
if (m_vHash[i] == sHash)
void CHashSet::SetPlain(string sHash, string sPlain, string sBinary)
{
- int i;
+ UINT4 i;
for (i = 0; i < m_vHash.size(); i++)
{
if (m_vHash[i] == sHash)
return true;
}
- int i;
+ UINT4 i;
for (i = 0; i < m_vHash.size(); i++)
{
if (m_vHash[i] == sHash)
int CHashSet::GetStatHashFound()
{
int nHashFound = 0;
- int i;
+ UINT4 i;
for (i = 0; i < m_vHash.size(); i++)
{
if (m_vFound[i])
int CHashSet::GetStatHashTotal()
{
- return m_vHash.size();
+ return (int) m_vHash.size();
}