7 #include "openssl/md4.h"
13 class LM2NTLMcorrector
19 map<unsigned char, map<int, unsigned char> > m_mapChar;
20 uint64 progressCurrentCombination;
21 uint64 totalCurrentCombination;
22 uint64 counterOverall;
23 unsigned char NTLMHash[16];
25 int countCombinations;
26 int countTotalCombinations;
28 clock_t previousClock;
29 unsigned char currentCharmap[16][128];
34 bool checkNTLMPassword(unsigned char* pLMPassword, int nLMPasswordLen, string& sNTLMPassword);
35 bool startCorrecting(string sLMPassword, unsigned char* pNTLMHash, string& sNTLMPassword, unsigned char* pLMPassword);
36 void printString(unsigned char* muteThis, int length);
37 void setupCombinationAtPositions(int length, unsigned char* pMuteMe, unsigned char* pTempMute, int* jAtPos, bool* fullAtPos, int* sizeAtPos);
38 bool checkPermutations(int length, unsigned char* pMuteMe, unsigned char* pTempMute, int* jAtPos, int* sizeAtPos, unsigned char* pLMPassword, string& sNTLMPassword);
40 int calculateTotalCombinations(int length, int setSize);
41 int factorial (int num);
43 bool parseHexPassword(string hexPassword, string& sPlain);
44 bool NormalizeHexString(string& sHash);
45 void ParseHash(string sHash, unsigned char* pHash, int& nHashLen);
46 string ByteToStr(const unsigned char* pData, int nLen);
47 void addToMapW(unsigned char key, unsigned char value1, unsigned char value2);
52 bool LMPasswordCorrectUnicode(string hexPassword, unsigned char* NTLMHash, string& sNTLMPassword);