]> git.sesse.net Git - freerainbowtables/blobdiff - Client Applications/rcracki_mt/CrackEngine.h
test
[freerainbowtables] / Client Applications / rcracki_mt / CrackEngine.h
index a5bc6a63417d4160f7698567c022e716d5225d6d..7fdf45902a5b46f042e75de71d96ccee81fc64cf 100644 (file)
@@ -1,98 +1,98 @@
-/*\r
- * rcracki_mt is a multithreaded implementation and fork of the original \r
- * RainbowCrack\r
- *\r
- * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>\r
- * Copyright Martin Westergaard Jørgensen <martinwj2005@gmail.com>\r
- * Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>\r
- * Copyright 2009, 2010 James Nobis <frt@quelrod.net>\r
- * Copyright 2010 uroskn\r
- *\r
- * This file is part of rcracki_mt.\r
- *\r
- * rcracki_mt is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * rcracki_mt is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with rcracki_mt.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-\r
-#ifndef _CRACKENGINE_H\r
-#define _CRACKENGINE_H\r
-\r
-#include "Public.h"\r
-#include "HashSet.h"\r
-#include "ChainWalkContext.h"\r
-#include "MemoryPool.h"\r
-#include "ChainWalkSet.h"\r
-#include "rcrackiThread.h"\r
-#ifdef _WIN32\r
-#include <conio.h>\r
-#include <windows.h>\r
-#endif\r
-#include <pthread.h>\r
-\r
-class CCrackEngine\r
-{\r
-public:\r
-       CCrackEngine();\r
-       virtual ~CCrackEngine();\r
-\r
-private:\r
-       CChainWalkSet m_cws;\r
-       int maxThreads;\r
-       uint64 maxMem;\r
-       bool writeOutput;\r
-       bool resumeSession;\r
-       string outputFile;\r
-       string sSessionPathName;\r
-       string sProgressPathName;\r
-       string sPrecalcPathName;\r
-       //string sPrecalcIndexPathName;\r
-       bool debug;\r
-       bool keepPrecalcFiles;\r
-\r
-       // Statistics\r
-       float m_fTotalDiskAccessTime;\r
-       float m_fTotalCryptanalysisTime;\r
-       float m_fTotalPrecalculationTime;\r
-       int m_nTotalChainWalkStep;\r
-       int m_nTotalFalseAlarm;\r
-       int m_nTotalChainWalkStepDueToFalseAlarm;\r
-       FILE *m_fChains;\r
-\r
-private:\r
-       void ResetStatistics();\r
-       RainbowChain *BinarySearch(RainbowChain *pChain, int nChainCountRead, uint64 nIndex, IndexChain *pIndex, int nIndexSize, int nIndexStart);\r
-       int BinarySearchOld(RainbowChainO* pChain, int nRainbowChainCount, uint64 nIndex);\r
-       void GetChainIndexRangeWithSameEndpoint(RainbowChainO* pChain,\r
-                                                                                   int nRainbowChainCount,\r
-                                                                                   int nChainIndex,\r
-                                                                                   int& nChainIndexFrom,\r
-                                                                                   int& nChainIndexTo);\r
-       void SearchTableChunk(RainbowChain* pChain, int nRainbowChainLen, int nRainbowChainCount, CHashSet& hs, IndexChain *pIndex, int nIndexSize, int nChainStart);\r
-       void SearchTableChunkOld(RainbowChainO* pChain, int nRainbowChainLen, int nRainbowChainCount, CHashSet& hs);\r
-       //bool CheckAlarm(RainbowChain* pChain, int nGuessedPos, unsigned char* pHash, CHashSet& hs);\r
-       //bool CheckAlarmOld(RainbowChainO* pChain, int nGuessedPos, unsigned char* pHash, CHashSet& hs);\r
-\r
-public:\r
-       void SearchRainbowTable(string sPathName, CHashSet& hs);\r
-       void Run(vector<string> vPathName, CHashSet& hs, int i_maxThreads, uint64 i_maxMem, bool resume, bool bDebug);\r
-       float GetStatTotalDiskAccessTime();\r
-       float GetStatTotalCryptanalysisTime();\r
-       float GetStatTotalPrecalculationTime();\r
-       int   GetStatTotalChainWalkStep();\r
-       int   GetStatTotalFalseAlarm();\r
-       int   GetStatTotalChainWalkStepDueToFalseAlarm();\r
-       void setOutputFile(string sPathName);\r
-       void setSession(string sSessionPathName, string sProgressPathName, string sPrecalcPathName, bool keepPrecalc);\r
-};\r
-\r
-#endif\r
+/*
+ * 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>
+ * Copyright 2010 uroskn
+ *
+ * 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/>.
+ */
+
+#ifndef _CRACKENGINE_H
+#define _CRACKENGINE_H
+
+#include "Public.h"
+#include "HashSet.h"
+#include "ChainWalkContext.h"
+#include "MemoryPool.h"
+#include "ChainWalkSet.h"
+#include "rcrackiThread.h"
+#ifdef _WIN32
+#include <conio.h>
+#include <windows.h>
+#endif
+#include <pthread.h>
+
+class CCrackEngine
+{
+public:
+       CCrackEngine();
+       virtual ~CCrackEngine();
+
+private:
+       CChainWalkSet m_cws;
+       int maxThreads;
+       uint64 maxMem;
+       bool writeOutput;
+       bool resumeSession;
+       string outputFile;
+       string sSessionPathName;
+       string sProgressPathName;
+       string sPrecalcPathName;
+       //string sPrecalcIndexPathName;
+       bool debug;
+       bool keepPrecalcFiles;
+
+       // Statistics
+       float m_fTotalDiskAccessTime;
+       float m_fTotalCryptanalysisTime;
+       float m_fTotalPrecalculationTime;
+       int m_nTotalChainWalkStep;
+       int m_nTotalFalseAlarm;
+       int m_nTotalChainWalkStepDueToFalseAlarm;
+       FILE *m_fChains;
+
+private:
+       void ResetStatistics();
+       RainbowChain *BinarySearch(RainbowChain *pChain, int nChainCountRead, uint64 nIndex, IndexChain *pIndex, int nIndexSize, int nIndexStart);
+       int BinarySearchOld(RainbowChainO* pChain, int nRainbowChainCount, uint64 nIndex);
+       void GetChainIndexRangeWithSameEndpoint(RainbowChainO* pChain,
+                                                                                   int nRainbowChainCount,
+                                                                                   int nChainIndex,
+                                                                                   int& nChainIndexFrom,
+                                                                                   int& nChainIndexTo);
+       void SearchTableChunk(RainbowChain* pChain, int nRainbowChainLen, int nRainbowChainCount, CHashSet& hs, IndexChain *pIndex, int nIndexSize, int nChainStart);
+       void SearchTableChunkOld(RainbowChainO* pChain, int nRainbowChainLen, int nRainbowChainCount, CHashSet& hs);
+       //bool CheckAlarm(RainbowChain* pChain, int nGuessedPos, unsigned char* pHash, CHashSet& hs);
+       //bool CheckAlarmOld(RainbowChainO* pChain, int nGuessedPos, unsigned char* pHash, CHashSet& hs);
+
+public:
+       void SearchRainbowTable(string sPathName, CHashSet& hs);
+       void Run(vector<string> vPathName, CHashSet& hs, int i_maxThreads, uint64 i_maxMem, bool resume, bool bDebug);
+       float GetStatTotalDiskAccessTime();
+       float GetStatTotalCryptanalysisTime();
+       float GetStatTotalPrecalculationTime();
+       int   GetStatTotalChainWalkStep();
+       int   GetStatTotalFalseAlarm();
+       int   GetStatTotalChainWalkStepDueToFalseAlarm();
+       void setOutputFile(string sPathName);
+       void setSession(string sSessionPathName, string sProgressPathName, string sPrecalcPathName, bool keepPrecalc);
+};
+
+#endif