Skip to content

Commit

Permalink
GUI: remove entropy view
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexodia committed Apr 6, 2019
1 parent 41978f9 commit 7d727d0
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 364 deletions.
17 changes: 0 additions & 17 deletions src/gui/Src/Gui/CPUDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "LineEditDialog.h"
#include "HexEditDialog.h"
#include "YaraRuleSelectionDialog.h"
#include "EntropyDialog.h"
#include "CPUMultiDump.h"
#include "GotoDialog.h"
#include "CPUDisassembly.h"
Expand Down Expand Up @@ -191,7 +190,6 @@ void CPUDump::setupContextMenu()

mMenuBuilder->addAction(makeShortcutAction(DIcon("sync.png"), tr("&Sync with expression"), SLOT(syncWithExpressionSlot()), "ActionSyncWithExpression"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("animal-dog.png"), ArchValue(tr("Watch DWORD"), tr("Watch QWORD")), SLOT(watchSlot()), "ActionWatchDwordQword"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("entropy.png"), tr("Entrop&y..."), SLOT(entropySlot()), "ActionEntropy"));
mMenuBuilder->addAction(makeShortcutAction(DIcon("memmap_alloc_memory.png"), tr("Allocate Memory"), SLOT(allocMemorySlot()), "ActionAllocateMemory"));

MenuBuilder* wGotoMenu = new MenuBuilder(this);
Expand Down Expand Up @@ -1696,21 +1694,6 @@ void CPUDump::yaraSlot()
}
}

void CPUDump::entropySlot()
{
dsint selStart = getSelectionStart();
dsint selSize = getSelectionEnd() - selStart + 1;
QVector<byte_t> data;
data.resize(selSize);
mMemPage->read(data.data(), selStart, selSize);

EntropyDialog entropyDialog(this);
entropyDialog.setWindowTitle(tr("Entropy (Address: %1, Size: %2)").arg(ToPtrString(rvaToVa(selStart))).arg(ToHexString(selSize)));
entropyDialog.show();
entropyDialog.GraphMemory(data.constData(), data.size());
entropyDialog.exec();
}

void CPUDump::syncWithExpressionSlot()
{
if(!DbgIsDebugging())
Expand Down
1 change: 0 additions & 1 deletion src/gui/Src/Gui/CPUDump.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public slots:

void selectionUpdatedSlot();
void yaraSlot();
void entropySlot();
void syncWithExpressionSlot();
void followInDumpNSlot();
void allocMemorySlot();
Expand Down
42 changes: 0 additions & 42 deletions src/gui/Src/Gui/EntropyDialog.cpp

This file was deleted.

30 changes: 0 additions & 30 deletions src/gui/Src/Gui/EntropyDialog.h

This file was deleted.

37 changes: 0 additions & 37 deletions src/gui/Src/Gui/EntropyDialog.ui

This file was deleted.

25 changes: 0 additions & 25 deletions src/gui/Src/Gui/MemoryMapView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "Bridge.h"
#include "PageMemoryRights.h"
#include "YaraRuleSelectionDialog.h"
#include "EntropyDialog.h"
#include "HexEditDialog.h"
#include "MiscUtil.h"
#include "GotoDialog.h"
Expand Down Expand Up @@ -160,12 +159,6 @@ void MemoryMapView::setupContextMenu()
this->addAction(mGotoExpression);
mGotoMenu->addAction(mGotoExpression);

//Entropy
mEntropy = new QAction(DIcon("entropy.png"), tr("Entropy..."), this);
mEntropy->setShortcutContext(Qt::WidgetShortcut);
this->addAction(mEntropy);
connect(mEntropy, SIGNAL(triggered()), this, SLOT(entropy()));

//Find
mFindPattern = new QAction(DIcon("search-for.png"), tr("&Find Pattern..."), this);
this->addAction(mFindPattern);
Expand Down Expand Up @@ -198,7 +191,6 @@ void MemoryMapView::refreshShortcutsSlot()
mFindPattern->setShortcut(ConfigShortcut("ActionFindPattern"));
mGotoOrigin->setShortcut(ConfigShortcut("ActionGotoOrigin"));
mGotoExpression->setShortcut(ConfigShortcut("ActionGotoExpression"));
mEntropy->setShortcut(ConfigShortcut("ActionEntropy"));
mMemoryFree->setShortcut(ConfigShortcut("ActionFreeMemory"));
mMemoryAllocate->setShortcut(ConfigShortcut("ActionAllocateMemory"));
mYara->setShortcut(ConfigShortcut("ActionYara"));
Expand All @@ -215,7 +207,6 @@ void MemoryMapView::contextMenuSlot(const QPoint & pos)
wMenu.addAction(mDumpMemory);
wMenu.addAction(mComment);
wMenu.addAction(mYara);
wMenu.addAction(mEntropy);
wMenu.addAction(mFindPattern);
wMenu.addAction(mSwitchView);
wMenu.addSeparator();
Expand Down Expand Up @@ -533,22 +524,6 @@ void MemoryMapView::switchView()
stateChangedSlot(paused);
}

void MemoryMapView::entropy()
{
duint addr = getCellContent(getInitialSelection(), 0).toULongLong(0, 16);
duint size = getCellContent(getInitialSelection(), 1).toULongLong(0, 16);
unsigned char* data = new unsigned char[size];
DbgMemRead(addr, data, size);

EntropyDialog entropyDialog(this);
entropyDialog.setWindowTitle(tr("Entropy (Address: %1, Size: %2)").arg(ToPtrString(addr).arg(ToPtrString(size))));
entropyDialog.show();
entropyDialog.GraphMemory(data, size);
entropyDialog.exec();

delete[] data;
}

void MemoryMapView::memoryAllocateSlot()
{
WordEditDialog mLineEdit(this);
Expand Down
2 changes: 0 additions & 2 deletions src/gui/Src/Gui/MemoryMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public slots:
void switchView();
void pageMemoryRights();
void refreshMap();
void entropy();
void findPatternSlot();
void dumpMemory();
void commentSlot();
Expand Down Expand Up @@ -69,7 +68,6 @@ public slots:
QAction* mMemoryExecuteRestore;
QAction* mMemoryRemove;
QAction* mMemoryExecuteSingleshootToggle;
QAction* mEntropy;
QAction* mFindPattern;
QMenu* mGotoMenu;
QAction* mGotoOrigin;
Expand Down
23 changes: 0 additions & 23 deletions src/gui/Src/Gui/SymbolView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "Configuration.h"
#include "Bridge.h"
#include "YaraRuleSelectionDialog.h"
#include "EntropyDialog.h"
#include "BrowseDialog.h"
#include "StdSearchListView.h"
#include "ZehSymbolTable.h"
Expand Down Expand Up @@ -293,12 +292,6 @@ void SymbolView::setupContextMenu()
mYaraFileAction = new QAction(DIcon("yara.png"), tr("&Yara File..."), this);
connect(mYaraFileAction, SIGNAL(triggered()), this, SLOT(moduleYaraFile()));

mEntropyAction = new QAction(DIcon("entropy.png"), tr("Entropy..."), this);
mEntropyAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mEntropyAction);
mModuleList->addAction(mEntropyAction);
connect(mEntropyAction, SIGNAL(triggered()), this, SLOT(moduleEntropy()));

mModSetUserAction = new QAction(DIcon("markasuser.png"), tr("Mark as &user module"), this);
mModSetUserAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
this->addAction(mModSetUserAction);
Expand Down Expand Up @@ -329,7 +322,6 @@ void SymbolView::refreshShortcutsSlot()
mModSetUserAction->setShortcut(ConfigShortcut("ActionMarkAsUser"));
mModSetSystemAction->setShortcut(ConfigShortcut("ActionMarkAsSystem"));
mModSetPartyAction->setShortcut(ConfigShortcut("ActionMarkAsParty"));
mEntropyAction->setShortcut(ConfigShortcut("ActionEntropy"));
mBrowseInExplorer->setShortcut(ConfigShortcut("ActionBrowseInExplorer"));
mDownloadSymbolsAction->setShortcut(ConfigShortcut("ActionDownloadSymbol"));
mDownloadAllSymbolsAction->setShortcut(ConfigShortcut("ActionDownloadAllSymbol"));
Expand Down Expand Up @@ -533,7 +525,6 @@ void SymbolView::moduleContextMenu(QMenu* wMenu)
wMenu->addAction(mFreeLib);
wMenu->addAction(mYaraAction);
wMenu->addAction(mYaraFileAction);
wMenu->addAction(mEntropyAction);
wMenu->addSeparator();
int party = DbgFunctions()->ModGetParty(modbase);
if(party != 0)
Expand Down Expand Up @@ -713,20 +704,6 @@ void SymbolView::toggleBookmark()
GuiUpdateAllViews();
}

void SymbolView::moduleEntropy()
{
duint modbase = DbgValFromString(mModuleList->mCurList->getCellContent(mModuleList->mCurList->getInitialSelection(), 0).toUtf8().constData());
char szModPath[MAX_PATH] = "";
if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath)))
{
EntropyDialog entropyDialog(this);
entropyDialog.setWindowTitle(tr("Entropy (%1)").arg(mModuleList->mCurList->getCellContent(mModuleList->mCurList->getInitialSelection(), 1)));
entropyDialog.show();
entropyDialog.GraphFile(QString(szModPath));
entropyDialog.exec();
}
}

void SymbolView::moduleSetSystem()
{
int i = mModuleList->mCurList->getInitialSelection();
Expand Down
2 changes: 0 additions & 2 deletions src/gui/Src/Gui/SymbolView.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ private slots:
void toggleBreakpoint();
void toggleBookmark();
void refreshShortcutsSlot();
void moduleEntropy();
void emptySearchResultSlot();
void selectionGetSlot(SELECTIONDATA* selection);
void moduleLoad();
Expand Down Expand Up @@ -87,7 +86,6 @@ private slots:
QAction* mCopyPathAction;
QAction* mYaraAction;
QAction* mYaraFileAction;
QAction* mEntropyAction;
QAction* mModSetUserAction;
QAction* mModSetSystemAction;
QAction* mModSetPartyAction;
Expand Down
66 changes: 0 additions & 66 deletions src/gui/Src/QEntropyView/Entropy.h

This file was deleted.

Loading

0 comments on commit 7d727d0

Please sign in to comment.