sFileName = sPathName.substr(nIndex + 1);
else
sFileName = sPathName;
+
// Info
printf("%s:\n", sFileName.c_str());
FILE *fResult = fopen(sResultFileName.c_str(), "wb");
printf("Invalid table type '%s'", sType.c_str());
return ;
}
- RainbowChainCP* pChain = (RainbowChainCP*)mp.Allocate(reader->GetChainsLeft() * sizeof(RainbowChainCP), nAllocatedSize);
+ int size = reader->GetChainsLeft() * sizeof(RainbowChain);
+#ifdef _MEMORYDEBUG
+ printf("Starting allocation of %i bytes\n", size);
+#endif
+ RainbowChain* pChain = (RainbowChain*)mp.Allocate(size, nAllocatedSize);
+#ifdef _MEMORYDEBUG
+ printf("Finished. Got %i bytes\n", nAllocatedSize);
+#endif
if (pChain != NULL)
{
- nAllocatedSize = nAllocatedSize / sizeof(RainbowChainCP) * sizeof(RainbowChainCP); // Round to boundary
- unsigned int nChains = nAllocatedSize / sizeof(RainbowChainCP);
+ nAllocatedSize = nAllocatedSize / sizeof(RainbowChain) * sizeof(RainbowChain); // Round to boundary
+ unsigned int nChains = nAllocatedSize / sizeof(RainbowChain);
while(reader->GetChainsLeft() > 0)
{
+#ifdef _MEMORYDEBUG
+ printf("Grabbing %i chains from file\n", nChains);
+#endif
reader->ReadChains(nChains, pChain);
- for(int i = 0; i < nChains; i++)
+#ifdef _MEMORYDEBUG
+ printf("Recieved %i chains from file\n", nChains);
+#endif
+ for(UINT4 i = 0; i < nChains; i++)
{
fwrite(&pChain[i], 1, 16, fResult);
}
printf("no rainbow table found\n");
return 0;
}
- for (int i = 0; i < vPathName.size(); i++)
+ for (UINT4 i = 0; i < vPathName.size(); i++)
{
string sResultFile, sType;