Skip to content

Commit

Permalink
Add WebSniff command in Tools menu
Browse files Browse the repository at this point in the history
  • Loading branch information
gilgil committed May 2, 2014
1 parent 43ccf0e commit ccb1fc9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 20 deletions.
29 changes: 20 additions & 9 deletions app/snoopspy/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,6 @@ void MainWindow::on_actionShowOption_triggered()
if (optionable->optionDoAll(this)) selectionChanged();
}

void MainWindow::on_actionHttpProxy_triggered()
{
QString url = "httpproxy.exe";
if (!QDesktopServices::openUrl(QUrl(url)))
{
LOG_ERROR("can not open url(%s)", qPrintable(url));
}
}

void MainWindow::on_actionLogServer_triggered()
{
QString url = "logserver.exe";
Expand Down Expand Up @@ -553,3 +544,23 @@ void MainWindow::on_actionWinDivert_Filter_triggered()
LOG_ERROR("can not open url(%s)", qPrintable(url));
}
}

void MainWindow::on_actionWebProxy_triggered()
{
QString url = "webproxy.exe";
if (!QDesktopServices::openUrl(QUrl(url)))
{
LOG_ERROR("can not open url(%s)", qPrintable(url));
}

}

void MainWindow::on_actionWebSniff_triggered()
{
QString url = "websniff.exe";
if (!QDesktopServices::openUrl(QUrl(url)))
{
LOG_ERROR("can not open url(%s)", qPrintable(url));
}

}
6 changes: 4 additions & 2 deletions app/snoopspy/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ private slots:

void on_actionShowOption_triggered();

void on_actionHttpProxy_triggered();

void on_actionLogServer_triggered();

void on_actionNetClient_triggered();
Expand All @@ -141,6 +139,10 @@ private slots:

void on_actionWinDivert_Filter_triggered();

void on_actionWebProxy_triggered();

void on_actionWebSniff_triggered();

private:
Ui::MainWindow *ui;
};
Expand Down
28 changes: 19 additions & 9 deletions app/snoopspy/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@
<property name="title">
<string>&amp;Tools</string>
</property>
<addaction name="actionHttpProxy"/>
<addaction name="actionLogServer"/>
<addaction name="actionNetClient"/>
<addaction name="actionNetServer"/>
<addaction name="actionWebProxy"/>
<addaction name="actionWebSniff"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuAction"/>
Expand Down Expand Up @@ -331,40 +332,49 @@
<string>WinDivert Filter</string>
</property>
</action>
<action name="actionHttpProxy">
<action name="actionLogServer">
<property name="icon">
<iconset resource="snoopspy.qrc">
<normaloff>:/images/tools.png</normaloff>:/images/tools.png</iconset>
</property>
<property name="text">
<string>HttpProxy</string>
<string>LogServer</string>
</property>
</action>
<action name="actionLogServer">
<action name="actionNetClient">
<property name="icon">
<iconset resource="snoopspy.qrc">
<normaloff>:/images/tools.png</normaloff>:/images/tools.png</iconset>
</property>
<property name="text">
<string>LogServer</string>
<string>NetClient</string>
</property>
</action>
<action name="actionNetClient">
<action name="actionNetServer">
<property name="icon">
<iconset resource="snoopspy.qrc">
<normaloff>:/images/tools.png</normaloff>:/images/tools.png</iconset>
</property>
<property name="text">
<string>NetClient</string>
<string>NetServer</string>
</property>
</action>
<action name="actionNetServer">
<action name="actionWebProxy">
<property name="icon">
<iconset resource="snoopspy.qrc">
<normaloff>:/images/tools.png</normaloff>:/images/tools.png</iconset>
</property>
<property name="text">
<string>NetServer</string>
<string>WebProxy</string>
</property>
</action>
<action name="actionWebSniff">
<property name="icon">
<iconset resource="snoopspy.qrc">
<normaloff>:/images/tools.png</normaloff>:/images/tools.png</iconset>
</property>
<property name="text">
<string>WebSniff</string>
</property>
</action>
</widget>
Expand Down

0 comments on commit ccb1fc9

Please sign in to comment.