| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 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 |