2 * rcracki_mt is a multithreaded implementation and fork of the original
\r
5 * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
\r
6 * Copyright 2009, 2010 Daniƫl Niggebrugge <niggebrugge@fox-it.com>
\r
7 * Copyright 2009, 2010, 2011 James Nobis <frt@quelrod.net>
\r
9 * This file is part of rcracki_mt.
\r
11 * rcracki_mt is free software: you can redistribute it and/or modify
\r
12 * it under the terms of the GNU General Public License as published by
\r
13 * the Free Software Foundation, version 2 of the License.
\r
15 * rcracki_mt is distributed in the hope that it will be useful,
\r
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
18 * GNU General Public License for more details.
\r
20 * You should have received a copy of the GNU General Public License
\r
21 * along with rcracki_mt. If not, see <http://www.gnu.org/licenses/>.
\r
37 using namespace std;
\r
40 struct RainbowChainO
\r
45 //struct RainbowChain
\r
58 unsigned short foo[3];
\r
59 unsigned short nIndexE;
\r
63 //struct RainbowChain
\r
65 // uint64 nIndexS : 48;
\r
66 // unsigned short nIndexE : 16;
\r
73 // //unsigned short nChainCount; //(maybe union with nPrefix, 1 byte spoiled)
\r
81 unsigned char foo[5];
\r
82 int nFirstChain; //4
\r
83 unsigned short nChainCount; //2
\r
85 //unsigned short nChainCount; (maybe union with nPrefix, 1 byte spoiled, no pack(1) needed)
\r
95 #define MAX_PLAIN_LEN 256
\r
96 #define MIN_HASH_LEN 8
\r
97 #define MAX_HASH_LEN 256
\r
98 #define MAX_SALT_LEN 256
\r
100 // XXX nmap is GPL2, will check newer releases regarding license
\r
101 // Code comes from nmap, used for the linux implementation of kbhit()
\r
103 #include <unistd.h>
\r
104 #include <termios.h>
\r
110 void tty_flush(void);
\r
115 #if defined(_WIN32) && !defined(__GNUC__)
\r
116 int gettimeofday( struct timeval *tv, struct timezone *tz );
\r
119 #if !defined(_WIN32) || defined(__GNUC__)
\r
120 #include <sys/time.h>
\r
123 timeval sub_timeofday( timeval tv2, timeval tv );
\r
125 long GetFileLen(FILE* file);
\r
126 string TrimString(string s);
\r
127 bool boinc_ReadLinesFromFile(string sPathName, vector<string>& vLine);
\r
128 bool ReadLinesFromFile(string sPathName, vector<string>& vLine);
\r
129 bool SeperateString(string s, string sSeperator, vector<string>& vPart);
\r
130 string uint64tostr(uint64 n);
\r
131 string uint64tohexstr(uint64 n);
\r
132 string HexToStr(const unsigned char* pData, int nLen);
\r
133 unsigned long GetAvailPhysMemorySize();
\r
134 string GetApplicationPath();
\r
135 void ParseHash(string sHash, unsigned char* pHash, int& nHashLen);
\r
136 bool GetHybridCharsets(string sCharset, vector<tCharset>& vCharset);
\r
138 bool writeResultLineToFile(string sOutputFile, string sHash, string sPlain, string sBinary);
\r