| 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 NTDICT_H |
| 33 | #define NTDICT_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 | #define PREFIX 0x3F |
| 45 | #define CAPITALIZE 0x40 |
| 46 | #define CAPITALIZE_1ST 0x80 |
| 47 | #define L33TSP34K 0x01 |
| 48 | #define CHOSE_POST 0x02 |
| 49 | #define POST_1 0xFC |
| 50 | #define POST_2 0x3F |
| 51 | |
| 52 | static const uchar_t ntdict63[64]="0123456789abcdefghijklmnopqrstuvwxyz!\"#$%&'()*+,-./:;<=>?@[\\]_|\0"; |
| 53 | static const uchar_t ntdict64[64]="0123456789abcdefghijklmnopqrstuvwxyz !\"#$%&'()*+,-./:;<=>?@[\\]_|"; |
| 54 | |
| 55 | int ntdict_setup(void *tbl_); |
| 56 | void ntdict_find(void *hsh_, void *tbl_, void *el_); |
| 57 | int ntdict_lookup_srt(void *hsh_, void *tbl_, void *el_); |
| 58 | int ntdict_check(void *hsh_, void *tbl_, void *el_); |
| 59 | int ntdict_isvalid(void *hsh_, void *tbl_); |
| 60 | |
| 61 | void ntdict_mkredux(table_t *tbl, uchar_t *hash, uchar_t *pwd, int n_redux); |
| 62 | void ntdict_mkhash(uchar_t *pwd, uchar_t *hash); |
| 63 | |
| 64 | #ifdef __cplusplus |
| 65 | } |
| 66 | #endif |
| 67 | #endif |