]> git.sesse.net Git - freerainbowtables/blobdiff - Client Applications/rcracki_mt/lm2ntlm.h
test
[freerainbowtables] / Client Applications / rcracki_mt / lm2ntlm.h
index 6a423f5f370f8688545ef565eb6ec35ad2fafbe5..3a4433421fe66bbb3254e7391d2eec6018bbf61e 100644 (file)
@@ -1,80 +1,80 @@
-/*\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
-#include <stdio.h>\r
-#include <string>\r
-#include <map>\r
-#ifdef _WIN32\r
-       #include <conio.h>\r
-#endif\r
-//#include "openssl/md4.h"\r
-#include <time.h>\r
-#include "signal.h"\r
-#include "Public.h"\r
-#include "md4.h"\r
-\r
-using namespace std;\r
-\r
-class LM2NTLMcorrector\r
-{\r
-public:\r
-       LM2NTLMcorrector();\r
-\r
-private:\r
-       map<unsigned char, map<int, unsigned char> > m_mapChar;\r
-       uint64 progressCurrentCombination;\r
-       uint64 totalCurrentCombination;\r
-       uint64 counterOverall;\r
-       unsigned char NTLMHash[16];\r
-       clock_t startClock;\r
-       int countCombinations;\r
-       int countTotalCombinations;\r
-       int counter;\r
-       clock_t previousClock;\r
-       unsigned char currentCharmap[16][128];\r
-       bool aborting;\r
-       string sBinary;\r
-\r
-private:\r
-       bool checkNTLMPassword(unsigned char* pLMPassword, int nLMPasswordLen, string& sNTLMPassword);\r
-       bool startCorrecting(string sLMPassword, string& sNTLMPassword, unsigned char* pLMPassword);\r
-       void printString(unsigned char* muteThis, int length);\r
-       void setupCombinationAtPositions(int length, unsigned char* pMuteMe, unsigned char* pTempMute, int* jAtPos, bool* fullAtPos, int* sizeAtPos);\r
-       bool checkPermutations(int length, unsigned char* pTempMute, int* jAtPos, int* sizeAtPos, unsigned char* pLMPassword, string& sNTLMPassword);\r
-\r
-       int calculateTotalCombinations(int length, int setSize);\r
-       int factorial (int num);\r
-\r
-       bool parseHexPassword(string hexPassword, string& sPlain);\r
-       bool NormalizeHexString(string& sHash);\r
-       void ParseHash(string sHash, unsigned char* pHash, int& nHashLen);\r
-       string ByteToStr(const unsigned char* pData, int nLen);\r
-       void addToMapW(unsigned char key, unsigned char value1, unsigned char value2);\r
-       void fillMapW();\r
-       void checkAbort();\r
-       void writeEndStats();\r
-public:\r
-       bool LMPasswordCorrectUnicode(string hexPassword, unsigned char* NTLMHash, string& sNTLMPassword);\r
-       string getBinary();\r
-};\r
-\r
+/*
+ * 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/>.
+ */
+
+#include <stdio.h>
+#include <string>
+#include <map>
+#ifdef _WIN32
+       #include <conio.h>
+#endif
+//#include "openssl/md4.h"
+#include <time.h>
+#include "signal.h"
+#include "Public.h"
+#include "md4.h"
+
+using namespace std;
+
+class LM2NTLMcorrector
+{
+public:
+       LM2NTLMcorrector();
+
+private:
+       map<unsigned char, map<int, unsigned char> > m_mapChar;
+       uint64 progressCurrentCombination;
+       uint64 totalCurrentCombination;
+       uint64 counterOverall;
+       unsigned char NTLMHash[16];
+       clock_t startClock;
+       int countCombinations;
+       int countTotalCombinations;
+       int counter;
+       clock_t previousClock;
+       unsigned char currentCharmap[16][128];
+       bool aborting;
+       string sBinary;
+
+private:
+       bool checkNTLMPassword(unsigned char* pLMPassword, int nLMPasswordLen, string& sNTLMPassword);
+       bool startCorrecting(string sLMPassword, string& sNTLMPassword, unsigned char* pLMPassword);
+       void printString(unsigned char* muteThis, int length);
+       void setupCombinationAtPositions(int length, unsigned char* pMuteMe, unsigned char* pTempMute, int* jAtPos, bool* fullAtPos, int* sizeAtPos);
+       bool checkPermutations(int length, unsigned char* pTempMute, int* jAtPos, int* sizeAtPos, unsigned char* pLMPassword, string& sNTLMPassword);
+
+       int calculateTotalCombinations(int length, int setSize);
+       int factorial (int num);
+
+       bool parseHexPassword(string hexPassword, string& sPlain);
+       bool NormalizeHexString(string& sHash);
+       void ParseHash(string sHash, unsigned char* pHash, int& nHashLen);
+       string ByteToStr(const unsigned char* pData, int nLen);
+       void addToMapW(unsigned char key, unsigned char value1, unsigned char value2);
+       void fillMapW();
+       void checkAbort();
+       void writeEndStats();
+public:
+       bool LMPasswordCorrectUnicode(string hexPassword, unsigned char* NTLMHash, string& sNTLMPassword);
+       string getBinary();
+};
+