2 RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
4 Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
20 #define uint64 unsigned __int64
23 #define uint64 unsigned long long
25 #define uint64 u_int64_t
48 unsigned short foo[3];
49 unsigned short nIndexE;
55 // uint64 nIndexS : 48;
56 // unsigned short nIndexE : 16;
63 // //unsigned short nChainCount; //(maybe union with nPrefix, 1 byte spoiled)
73 unsigned short nChainCount; //2
75 //unsigned short nChainCount; (maybe union with nPrefix, 1 byte spoiled, no pack(1) needed)
85 #define MAX_PLAIN_LEN 256
86 #define MIN_HASH_LEN 8
87 #define MAX_HASH_LEN 256
88 #define MAX_SALT_LEN 256
90 // Code comes from nmap, used for the linux implementation of kbhit()
104 unsigned int GetFileLen(FILE* file);
105 string TrimString(string s);
106 bool ReadLinesFromFile(string sPathName, vector<string>& vLine);
107 bool SeperateString(string s, string sSeperator, vector<string>& vPart);
108 string uint64tostr(uint64 n);
109 string uint64tohexstr(uint64 n);
110 string HexToStr(const unsigned char* pData, int nLen);
111 unsigned int GetAvailPhysMemorySize();
112 string GetApplicationPath();
113 void ParseHash(string sHash, unsigned char* pHash, int& nHashLen);
114 bool GetHybridCharsets(string sCharset, vector<tCharset>& vCharset);
116 bool writeResultLineToFile(string sOutputFile, string sHash, string sPlain, string sBinary);