1
0
Fork 0

shortcuts (#925)

This commit is contained in:
Torusrxxx 2016-08-12 11:09:52 +00:00 committed by Duncan Ogilvie
parent 72284e8528
commit 616810fca7
5 changed files with 44 additions and 0 deletions

View File

@ -311,6 +311,7 @@ MainWindow::MainWindow(QWidget* parent)
connect(ui->actionSEHChain, SIGNAL(triggered()), this, SLOT(displaySEHChain()));
connect(ui->actionDonate, SIGNAL(triggered()), this, SLOT(donate()));
connect(ui->actionReportBug, SIGNAL(triggered()), this, SLOT(reportBug()));
connect(ui->actionBlog, SIGNAL(triggered()), this, SLOT(blog()));
connect(ui->actionCrashDump, SIGNAL(triggered()), this, SLOT(crashDump()));
connect(ui->actionAttach, SIGNAL(triggered()), this, SLOT(displayAttach()));
makeCommandAction(ui->actionDetach, "detach");
@ -1255,6 +1256,19 @@ void MainWindow::donate()
QDesktopServices::openUrl(QUrl("http://donate.x64dbg.com"));
}
void MainWindow::blog()
{
QMessageBox msg(QMessageBox::Information, tr("Blog"), tr("You will visit x64dbg's official blog."));
msg.setWindowIcon(DIcon("hex.png"));
msg.setParent(this, Qt::Dialog);
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
msg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msg.setDefaultButton(QMessageBox::Ok);
if(msg.exec() != QMessageBox::Ok)
return;
QDesktopServices::openUrl(QUrl("http://blog.x64dbg.com"));
}
void MainWindow::reportBug()
{
QMessageBox msg(QMessageBox::Information, tr("Report Bug"), tr("You will be taken to a website where you can report a bug.\nMake sure to fill in as much information as possible."));

View File

@ -111,6 +111,7 @@ public slots:
void openShortcuts();
void changeTopmost(bool checked);
void donate();
void blog();
void reportBug();
void displayAttach();
void changeCommandLine();

View File

@ -132,6 +132,7 @@
</property>
<addaction name="actionCalculator"/>
<addaction name="actionCheckUpdates"/>
<addaction name="actionBlog"/>
<addaction name="actionDonate"/>
<addaction name="actionReportBug"/>
<addaction name="separator"/>
@ -994,6 +995,15 @@
<string>Run (swallow exception)</string>
</property>
</action>
<action name="actionBlog">
<property name="icon">
<iconset resource="../../resource.qrc">
<normaloff>:/icons/images/hex.png</normaloff>:/icons/images/hex.png</iconset>
</property>
<property name="text">
<string>Blog</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>

View File

@ -7,6 +7,7 @@
#include "EntropyDialog.h"
#include "LineEditDialog.h"
#include <QVBoxLayout>
#include <QProcess>
SymbolView::SymbolView(QWidget* parent) : QWidget(parent), ui(new Ui::SymbolView)
{
@ -140,6 +141,9 @@ void SymbolView::setupContextMenu()
mCopyPathAction = new QAction(tr("Copy File &Path"), this);
connect(mCopyPathAction, SIGNAL(triggered()), this, SLOT(moduleCopyPath()));
mBrowseInExplorer = new QAction(tr("Browse in Explorer"), this);
connect(mBrowseInExplorer, SIGNAL(triggered()), this, SLOT(moduleBrowse()));
mYaraAction = new QAction(DIcon("yara.png"), tr("&Yara Memory..."), this);
connect(mYaraAction, SIGNAL(triggered()), this, SLOT(moduleYara()));
@ -323,7 +327,10 @@ void SymbolView::moduleContextMenu(QMenu* wMenu)
duint modbase = DbgValFromString(mModuleList->mCurList->getCellContent(mModuleList->mCurList->getInitialSelection(), 0).toUtf8().constData());
char szModPath[MAX_PATH] = "";
if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath)))
{
wMenu->addAction(mCopyPathAction);
wMenu->addAction(mBrowseInExplorer);
}
wMenu->addAction(mYaraAction);
wMenu->addAction(mYaraFileAction);
wMenu->addAction(mEntropyAction);
@ -363,6 +370,16 @@ void SymbolView::moduleCopyPath()
Bridge::CopyToClipboard(szModPath);
}
void SymbolView::moduleBrowse()
{
duint modbase = DbgValFromString(mModuleList->mCurList->getCellContent(mModuleList->mCurList->getInitialSelection(), 0).toUtf8().constData());
char szModPath[MAX_PATH] = "";
if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath)))
{
QProcess::startDetached("explorer.exe", QStringList(QString("/select,").append(QString::fromUtf8(szModPath))));
}
}
void SymbolView::moduleYara()
{
QString modname = mModuleList->mCurList->getCellContent(mModuleList->mCurList->getInitialSelection(), 1);

View File

@ -39,6 +39,7 @@ private slots:
void moduleDownloadSymbols();
void moduleDownloadAllSymbols();
void moduleCopyPath();
void moduleBrowse();
void moduleYara();
void moduleYaraFile();
void moduleSetUser();
@ -77,6 +78,7 @@ private:
QAction* mModSetUserAction;
QAction* mModSetSystemAction;
QAction* mModSetPartyAction;
QAction* mBrowseInExplorer;
static void cbSymbolEnum(SYMBOLINFO* symbol, void* user);
};