]> git.sesse.net Git - freerainbowtables/blobdiff - Client Applications/rcracki_mt/rcrackiThread.h
backport rcracki_mt trunk from rcracki.sourceforge.net
[freerainbowtables] / Client Applications / rcracki_mt / rcrackiThread.h
index a53cac24702cb02f5c597ebb7cacb8c47aba3a57..37fa28915d966e9bf17e763eaf894fd8b8477fe1 100644 (file)
@@ -1,85 +1,85 @@
-/*
- * 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/>.
- */
-
-#ifdef _WIN32
-       #pragma once
-#endif
-
-#include "ChainWalkContext.h"
-#include "Public.h"
-#include "HashSet.h"
-//#include <process.h>
-#include <pthread.h>
-
-class rcrackiThread
-{
-private:
-       unsigned char* t_TargetHash;
-       int t_nPos;
-       int t_nRainbowChainLen;
-       CChainWalkContext t_cwc;
-       vector<uint64> t_vStartPosIndexE;
-       int t_ID;
-       int t_count;
-       uint64* t_pStartPosIndexE;
-       int t_nChainWalkStep;
-       bool falseAlarmChecker;
-       bool falseAlarmCheckerO;
-       vector<RainbowChain *> t_pChainsFound;
-       vector<RainbowChainO *> t_pChainsFoundO;
-       vector<int> t_nGuessedPoss;
-       unsigned char* t_pHash;
-       bool foundHash;
-       int t_nChainWalkStepDueToFalseAlarm;
-       int t_nFalseAlarm;
-       string t_Hash;
-       string t_Plain;
-       string t_Binary;
-
-public:
-       rcrackiThread(unsigned char* TargetHash, int thread_id, int nRainbowChainLen, int thread_count, uint64* pStartPosIndexE);
-       rcrackiThread(unsigned char* pHash, bool oldFormat = false);
-       rcrackiThread(void);
-       ~rcrackiThread(void);
-
-       //void SetWork(unsigned char* TargetHash, int nPos, int nRainbowChainLen);
-       //static unsigned __stdcall rcrackiThread::rcrackiThreadStaticEntryPoint(void * pThis);
-       static void * rcrackiThreadStaticEntryPointPthread(void * pThis);
-       int GetIndexCount();
-       int GetChainWalkStep();
-       uint64 GetIndex(int nPos);
-       bool FoundHash();
-       void AddAlarmCheck(RainbowChain* pChain, int nGuessedPos);
-       void AddAlarmCheckO(RainbowChainO* pChain, int nGuessedPos);
-       int GetChainWalkStepDueToFalseAlarm();
-       int GetnFalseAlarm();
-       string GetHash();
-       string GetPlain();
-       string GetBinary();
-
-private:
-       void rcrackiThreadEntryPoint();
-       void PreCalculate();
-       void CheckAlarm();
-       void CheckAlarmO();
-};
+/*\r
+ * rcracki_mt is a multithreaded implementation and fork of the original \r
+ * RainbowCrack\r
+ *\r
+ * Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>\r
+ * Copyright 2009, 2010 James Nobis <frt@quelrod.net>\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
+#ifdef _WIN32\r
+       #pragma once\r
+#endif\r
+\r
+#include "ChainWalkContext.h"\r
+#include "Public.h"\r
+#include "HashSet.h"\r
+//#include <process.h>\r
+#include <pthread.h>\r
+\r
+class rcrackiThread\r
+{\r
+private:\r
+       unsigned char* t_TargetHash;\r
+       int t_nPos;\r
+       int t_nRainbowChainLen;\r
+       CChainWalkContext t_cwc;\r
+       vector<uint64> t_vStartPosIndexE;\r
+       int t_ID;\r
+       int t_count;\r
+       uint64* t_pStartPosIndexE;\r
+       int t_nChainWalkStep;\r
+       bool falseAlarmChecker;\r
+       bool falseAlarmCheckerO;\r
+       vector<RainbowChain *> t_pChainsFound;\r
+       vector<RainbowChainO *> t_pChainsFoundO;\r
+       vector<int> t_nGuessedPoss;\r
+       unsigned char* t_pHash;\r
+       bool foundHash;\r
+       int t_nChainWalkStepDueToFalseAlarm;\r
+       int t_nFalseAlarm;\r
+       string t_Hash;\r
+       string t_Plain;\r
+       string t_Binary;\r
+\r
+public:\r
+       rcrackiThread(unsigned char* TargetHash, int thread_id, int nRainbowChainLen, int thread_count, uint64* pStartPosIndexE);\r
+       rcrackiThread(unsigned char* pHash, bool oldFormat = false);\r
+       rcrackiThread(void);\r
+       ~rcrackiThread(void);\r
+\r
+       //void SetWork(unsigned char* TargetHash, int nPos, int nRainbowChainLen);\r
+       //static unsigned __stdcall rcrackiThread::rcrackiThreadStaticEntryPoint(void * pThis);\r
+       static void * rcrackiThreadStaticEntryPointPthread(void * pThis);\r
+       int GetIndexCount();\r
+       int GetChainWalkStep();\r
+       uint64 GetIndex(int nPos);\r
+       bool FoundHash();\r
+       void AddAlarmCheck(RainbowChain* pChain, int nGuessedPos);\r
+       void AddAlarmCheckO(RainbowChainO* pChain, int nGuessedPos);\r
+       int GetChainWalkStepDueToFalseAlarm();\r
+       int GetnFalseAlarm();\r
+       string GetHash();\r
+       string GetPlain();\r
+       string GetBinary();\r
+\r
+private:\r
+       void rcrackiThreadEntryPoint();\r
+       void PreCalculate();\r
+       void CheckAlarm();\r
+       void CheckAlarmO();\r
+};\r