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 OPHCRACKGUI_H 33 #define OPHCRACKGUI_H 34 35 #include <QMainWindow> 36 #include <QFileDialog> 37 #include <time.h> 38 #include <sys/time.h> 39 #include <stdint.h> 40 #include <config.h> 41 42 #include "ui_ophcrackgui.h" 43 #include "tabledialog.h" 44 #include "hashmodel.h" 45 #include "tablemodel.h" 46 #include "progdelegate.h" 47 #include "ophcrack.h" 48 #include "arg.h" 49 #include "message.h" 50 #include "fsm.h" 51 #include "list.h" 52 #include "helpdialog.h" 53 #include "exportdialog.h" 54 #include "graphdialog.h" 55 56 class OphcrackGUI : public QMainWindow, public Ui::OphcrackGUI { 57 Q_OBJECT 58 59 public: 60 OphcrackGUI(ophcrack_t *crack); 61 62 private slots: 63 void tableItemChanged(QStandardItem *item); 64 void selectTables(void); 65 void startStopCrack(void); 66 void handleMessages(void); 67 void loadSingleHash(void); 68 void loadHashFile(void); 69 void loadSamFile(void); 70 void loadLocalSamSamdump(void); 71 void save(void); 72 void exportCSV(void); 73 void delSelection(void); 74 void resetStat(void); 75 void displayGraph(void); 76 void updateConfig(void); 77 void defaultConfig(void); 78 void threadChanged(int x); 79 void hreduxChanged(int x); 80 void queueChanged(int x); 81 void bforceChanged(int x); 82 void hideUnameChanged(int x); 83 void auditModeChanged(int x); 84 void close(void); 85 void addDelHash(const QModelIndex &parent, int start, int end); 86 void tablesChanged(void); 87 void hashesAdded(list_t *hashes); 88 void displayAbout(void); 89 void displayHelp(void); 90 void installTables(QString str, bool replace, bool warn); 91 void sessOnOff(int state); 92 void chooseSessFile(void); 93 94 private: 95 void startCrack(void); 96 void stopCrack(void); 97 void updateStat(void); 98 void updateProgress(void); 99 void updateStatus(void); 100 void resetTime(void); 101 void saveConfig(void); 102 void closeEvent(QCloseEvent *event); 103 void showNotFound(bool flag); 104 105 private: 106 fsm_t *fsm; 107 arg_t *arg; 108 109 struct timeval tm_start; 110 struct timeval tm_total; 111 struct timeval tm_sess; 112 113 ophcrack_t *crack; 114 HashModel *hashModel; 115 TableModel *tableModel; 116 TableDialog *tableDialog; 117 ProgDelegate *progDelegate; 118 QItemSelectionModel *hashSelModel; 119 HelpDialog *helpDialog; 120 ExportDialog *exportDialog; 121 GraphDialog *graphDialog; 122 123 QMenu *loadMenu; 124 QAction *singleHash; 125 QAction *hashFile; 126 QAction *samFile; 127 QAction *sessFile; 128 QAction *localSam2; 129 130 QMenu *saveMenu; 131 QAction *saveFile; 132 QAction *exportFile; 133 134 }; 135 136 #endif 137