/
nmapsi4Slot.cpp
172 lines (155 loc) · 7.6 KB
/
nmapsi4Slot.cpp
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/***************************************************************************
* Copyright (C) 2007-2010 by Francesco Cecconi *
* francesco.cecconi@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "../mainwin.h"
void nmapClass::setNmapsiSlot()
{
connect(portCombo, SIGNAL(activated(const QString&)),
this, SLOT(update_portCombo())); // portCombo slot
connect(comboScan, SIGNAL(activated(const QString&)),
this, SLOT(update_scanCombo())); // comboScan slot
connect(checkInputFile, SIGNAL(toggled(bool)),
this, SLOT(update_inputcheck())); // input check
connect(actionStop_Scan, SIGNAL(triggered()),
this, SLOT(stop_scan())); // stop scan button slot
// discover
connect(checkTcpPing, SIGNAL(toggled(bool)),
this, SLOT(update_discover())); // discover check
connect(checkTcpSyn, SIGNAL(toggled(bool)),
this, SLOT(update_discover())); // discover check
connect(checkUdpPing, SIGNAL(toggled(bool)),
this, SLOT(update_discover())); // discover check
// action slot
connect(action_Quit, SIGNAL(triggered()),
this, SLOT(exit())); // file action menu
connect(action_Quit_2, SIGNAL(triggered()),
this, SLOT(exit())); // file action menu
connect(action_About, SIGNAL(triggered()),
this, SLOT(about())); // about action menu
connect(actionAbout_Qt, SIGNAL(triggered()),
this, SLOT(about_qt())); // about action menu
connect(action_Scan_menu, SIGNAL(triggered()),
this, SLOT(startScan())); // about action menu
connect(actionClear_History, SIGNAL(triggered()),
this, SLOT(listClear()));
connect(buttonHClear, SIGNAL(clicked()),
hostEdit, SLOT(clearEditText()));
connect(action_Scan_2, SIGNAL(triggered()),
this, SLOT(startScan())); // about action menu
connect(buttonBrowser, SIGNAL(clicked()),
this, SLOT(input_browser())); // Input file Browser slot
// Timing Slot (Enable and Disable spinBox)
connect(TcheckIpv4ttl, SIGNAL(toggled(bool)),
this, SLOT(update_timing()));
connect(TcheckMinPar, SIGNAL(toggled(bool)),
this, SLOT(update_timing()));
connect(TcheckMaxPar, SIGNAL(toggled(bool)),
this, SLOT(update_timing()));
connect(TcheckInitRtt, SIGNAL(toggled(bool)),
this, SLOT(update_timing()));
connect(TcheckMinRtt, SIGNAL(toggled(bool)),
this, SLOT(update_timing()));
connect(TcheckMaxRtt, SIGNAL(toggled(bool)),
this, SLOT(update_timing()));
connect(TcheckHostTime, SIGNAL(toggled(bool)),
this, SLOT(update_timing()));
connect(TcheckScanDelay, SIGNAL(toggled(bool)),
this, SLOT(update_timing()));
//Options
connect(checkBoxDevice, SIGNAL(toggled(bool)),
this, SLOT(update_options()));
connect(checkDecoy, SIGNAL(toggled(bool)),
this, SLOT(update_options()));
connect(checkSpoof, SIGNAL(toggled(bool)),
this, SLOT(update_options()));
connect(checkSourcePort, SIGNAL(toggled(bool)),
this, SLOT(update_options()));
connect(comboVerbosity, SIGNAL(activated(const QString&)),
this, SLOT(update_comboVerbosity()));
connect(actionProfile, SIGNAL(triggered()),
this, SLOT(startProfile_ui()));
connect(action_Save_As, SIGNAL(triggered()),
this, SLOT(saveAsLog()));
connect(actionSave, SIGNAL(triggered()),
this, SLOT(saveLog()));
connect(actionSave_As_Menu, SIGNAL(triggered()),
this, SLOT(saveAsLog()));
connect(actionSave_Menu, SIGNAL(triggered()),
this, SLOT(saveLog()));
connect(actionClose_Tree, SIGNAL(triggered()),
this, SLOT(closeTree()));
connect(actionFullS, SIGNAL(triggered()),
this, SLOT(checkFullScreen()));
connect(actionMenuBar, SIGNAL(triggered()),
this, SLOT(updateMenuBar()));
connect(actionMain_Toolbars, SIGNAL(triggered()),
this, SLOT(showMainToolBar()));
connect(actionActions_Toolbar, SIGNAL(triggered()),
this, SLOT(showActionToolBar()));
connect(actionShow_Status_Bar, SIGNAL(triggered()),
this, SLOT(showStatusBar()));
connect(hostEdit->lineEdit(), SIGNAL(returnPressed()),
this, SLOT(startScan()));
connect(hostEdit, SIGNAL(editTextChanged(QString)),
this, SLOT(updateFontHost(const QString)));
connect(toolBox, SIGNAL(currentChanged(int)),
this, SLOT(updateIconsBox()));
connect(showExtB, SIGNAL(clicked()),
this, SLOT(showExt()));
connect(listWscan, SIGNAL( itemActivated(QTreeWidgetItem*, int)),
this, SLOT(runtimePars(QTreeWidgetItem*, int)));
// BookMark signals
connect(deleteBook, SIGNAL(clicked()),
this, SLOT(deleteBookMark()));
connect(treeLogH, SIGNAL( itemSelectionChanged()),
this, SLOT(activeBookTool()));
connect(treeBookVuln, SIGNAL( itemSelectionChanged()),
this, SLOT(activeBookTool()));
connect(treeLogH, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)),
this, SLOT(callScanH()));
// Vuln signal
connect(buttonVuln, SIGNAL(clicked()),
this, SLOT(searchVuln()));
connect(viewVuln, SIGNAL(loadProgress(int)),
progressWeb, SLOT(setValue(int)));
connect(Bleft, SIGNAL(clicked()),
viewVuln, SLOT(back()));
connect(Bright, SIGNAL(clicked()),
viewVuln, SLOT(forward()));
connect(Bstop, SIGNAL(clicked()),
viewVuln, SLOT(stop()));
connect(comboVuln, SIGNAL(currentIndexChanged(const QString&)),
comboVulnRis, SLOT(setEditText(const QString&)));
connect(deleteBookVuln, SIGNAL(clicked()),
this, SLOT(deleteBookMark()));
connect(comboVulnRis, SIGNAL(editTextChanged(QString)),
this, SLOT(callSearchHistoryVuln()));
connect(treeBookVuln, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)),
this, SLOT(callVulnCheck()));
connect(actionAdd_Bookmark, SIGNAL(triggered()),
this, SLOT(saveBookMarks()));
connect(action_Add_BookmarkToolBar, SIGNAL(triggered()),
this, SLOT(saveBookMarks()));
// main session
connect(scanSez_, SIGNAL(triggered()),
this, SLOT(updateSezScan()));
connect(logSez_, SIGNAL(triggered()),
this, SLOT(updateSezLog()));
connect(vulnSez_, SIGNAL(triggered()),
this, SLOT(updateSezVuln()));
}