class BaseRTReader
{
public:
- virtual int ReadChains(UINT4 &numChains, RainbowChain *pData) = 0;
- virtual UINT4 GetChainsLeft() = 0;
+ virtual int ReadChains(uint32 &numChains, RainbowChainO *pData) = 0;
+ virtual uint32 GetChainsLeft() = 0;
virtual ~BaseRTReader() { };
};
printf("hash routine: %s\n", m_sHashRoutineName.c_str());
printf("hash length: %d\n", m_nHashLen);
+ printf( "m_vCharset[0].m_nPlainCharSetLen: %d\n", m_vCharset[0].m_nPlainCharsetLen );
+ printf( "m_vCharset[1].m_nPlainCharSetLen: %d\n", m_vCharset[1].m_nPlainCharsetLen );
+
printf("plain charset: ");
unsigned int i;
+
for (i = 0; i < m_vCharset[0].m_nPlainCharsetLen; i++)
{
if (isprint(m_vCharset[0].m_PlainCharset[i]))
}
m_Plain[i] = m_vCharset[j].m_PlainCharset[nTemp];
#else
- __asm__ __volatile__ ( "mov %2, %%eax;"
- "xor %%edx, %%edx;"
+ __asm__ __volatile__ ("xor %%edx, %%edx;"
"divl %3;"
- "mov %%eax, %0;"
- "mov %%edx, %1;"
- : "=m"(nIndexOfX32), "=m"(nTemp)
- : "m"(nIndexOfX32), "m"(m_vCharset[j].m_nPlainCharsetLen)
- : "%eax", "%edx"
- );
+ : "=a"(nIndexOfX32), "=d"(nTemp)
+ : "a"(nIndexOfX32), "rm"(m_vCharset[j].m_nPlainCharsetLen)
+ : );
m_Plain[i] = m_vCharset[j].m_PlainCharset[nTemp];
#endif
break;
{
return HexToStr(m_Plain, m_nPlainLen);
}
-/*
-string CChainWalkContext::GetPlainBinary()
-{
- string sRet;
- sRet += GetPlain();
- int i;
- for (i = 0; i < m_nPlainLenMax - m_nPlainLen; i++)
- sRet += ' ';
- sRet += "|";
-
- sRet += GetBinary();
- for (i = 0; i < m_nPlainLenMax - m_nPlainLen; i++)
- sRet += " ";
-
- return sRet;
-}
-*/
string CChainWalkContext::GetHash()
{
return HexToStr(m_Hash, m_nHashLen);
static bool isRti2RtFormat;
static vector<stCharset> m_vCharset;
static int m_nPlainLenMinTotal, m_nPlainLenMaxTotal;
- static uint64 m_nPlainSpaceTotal; // Performance consideration
static uint64 m_nPlainSpaceUpToX[MAX_PLAIN_LEN + 1]; // Performance consideration
+ static uint64 m_nPlainSpaceTotal; // Performance consideration
static int m_nHybridCharset;
static int m_nRainbowTableIndex; // Configuration
static uint64 m_nReduceOffset; // Performance consideration
const uint64* GetIndexPtr();
string GetPlain();
string GetBinary();
-// string GetPlainBinary();
string GetHash();
bool CheckHash(unsigned char* pHash); // The length should be m_nHashLen
};
+/*
+ * freerainbowtables is a project for generating, distributing, and using
+ * perfect rainbow tables
+ *
+ * Copyright Bitweasil
+ * Copyright 2009, 2010 Daniƫl Niggebrugge <niggebrugge@fox-it.com>
+ * Copyright 2009, 2010, 2011 James Nobis <frt@quelrod.net>
+ *
+ * This file is part of freerainbowtables.
+ *
+ * freerainbowtables 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.
+ *
+ * freerainbowtables 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 freerainbowtables. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#ifndef MD4_H
#define MD4_H
#include "global.h"
-
#define MD4_DIGEST_LENGTH 16
//Main function