2 * freerainbowtables is a project for generating, distributing, and using
3 * perfect rainbow tables
5 * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
6 * Copyright 2009, 2010 Daniƫl Niggebrugge <niggebrugge@fox-it.com>
7 * Copyright 2009, 2010 James Nobis <frt@quelrod.net>
9 * This file is part of freerainbowtables.
11 * freerainbowtables is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation, either version 2 of the License.
15 * freerainbowtables is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with freerainbowtables. If not, see <http://www.gnu.org/licenses/>.
49 unsigned short nCheckPoint;
57 struct FoundRainbowChain
64 struct ChainCheckChain
72 unsigned int prefixstart, numchains;
82 #define MAX_PLAIN_LEN 256
83 #define MIN_HASH_LEN 8
84 #define MAX_HASH_LEN 256
85 #define MAX_SALT_LEN 256
87 // XXX nmap is GPL2, will check newer releases regarding license
88 // Code comes from nmap, used for the linux implementation of kbhit()
102 #if defined(_WIN32) && !defined(__GNUC__)
103 int gettimeofday( struct timeval *tv, struct timezone *tz );
105 #include <sys/time.h>
108 timeval sub_timeofday( timeval tv2, timeval tv );
110 long GetFileLen(FILE* file);
111 string TrimString(string s);
112 bool boinc_ReadLinesFromFile(string sPathName, vector<string>& vLine);
113 bool ReadLinesFromFile(string sPathName, vector<string>& vLine);
114 bool SeperateString(string s, string sSeperator, vector<string>& vPart);
115 string uint64tostr(uint64 n);
116 string uint64tohexstr(uint64 n);
117 string HexToStr(const unsigned char* pData, int nLen);
118 unsigned long GetAvailPhysMemorySize();
119 string GetApplicationPath();
120 void ParseHash(string sHash, unsigned char* pHash, int& nHashLen);
121 bool GetHybridCharsets(string sCharset, vector<tCharset>& vCharset);
123 bool writeResultLineToFile(string sOutputFile, string sHash, string sPlain, string sBinary);