1 /* 2 * 3 * Ophcrack is a Lanmanager/NTLM hash cracker based on the faster time-memory 4 * trade-off using rainbow tables. 5 * 6 * Created with the help of: Maxime Mueller, Luca Wullschleger, Claude 7 * Hochreutiner, Andreas Huber and Etienne Dysli. 8 * 9 * Copyright (c) 2008 Philippe Oechslin, Cedric Tissieres, Bertrand Mesot 10 * 11 * Ophcrack 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, or 14 * (at your option) any later version. 15 * 16 * Ophcrack is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with Ophcrack; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * 25 * This program is released under the GPL with the additional exemption 26 * that compiling, linking, and/or using OpenSSL is allowed. 27 * 28 * 29 * 30 * 31 */ 32 #ifndef NTEXTENDED_H 33 #define NTEXTENDED_H 34 35 #include <stdint.h> 36 37 #include "misc.h" 38 #include "table.h" 39 40 #ifdef __cplusplus 41 extern "C" { 42 #endif 43 44 static const uint32_t ntextended_max[9] = { 0, 0, 1, 6, 525, 49896, 4740179, 450317032, 2584948056U }; 45 static const uchar_t ntextended_low36[36]="0123456789abcdefghijklmnopqrstuvwxyz"; 46 static const uchar_t ntextended_alphanum62[62]="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; 47 static const uchar_t ntextended_ext95[95]="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"; 48 static const uint64_t ntextended_offset[8] = {0ULL, 95ULL, 9120ULL, 866495ULL, 82317120ULL, 7820126495ULL, 742912017120ULL, 4264526623328ULL}; 49 50 int ntextended_setup(void *tbl_); 51 void ntextended_find(void *hsh_, void *tbl_, void *el_); 52 int ntextended_lookup_srt(void *hsh_, void *tbl_, void *el_); 53 int ntextended_check(void *hsh_, void *tbl_, void *el_); 54 int ntextended_isvalid(void *hsh_, void *tbl_); 55 56 void ntextended_mkredux(table_t *tbl, uchar_t *hash, uchar_t *pwd, int n_redux); 57 void ntextended_mkhash(uchar_t *pwd, uchar_t *hash); 58 59 uint64_t ntextended_bin43(uchar_t *input); 60 void ntextended_unbin95(uint32_t input, uchar_t *output); 61 62 #ifdef __cplusplus 63 } 64 #endif 65 #endif 66