Skip to content

Commit 7d727d0

Browse files
committed
GUI: remove entropy view
1 parent 41978f9 commit 7d727d0

16 files changed

+0
-364
lines changed

src/gui/Src/Gui/CPUDump.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "LineEditDialog.h"
99
#include "HexEditDialog.h"
1010
#include "YaraRuleSelectionDialog.h"
11-
#include "EntropyDialog.h"
1211
#include "CPUMultiDump.h"
1312
#include "GotoDialog.h"
1413
#include "CPUDisassembly.h"
@@ -191,7 +190,6 @@ void CPUDump::setupContextMenu()
191190

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

197195
MenuBuilder* wGotoMenu = new MenuBuilder(this);
@@ -1696,21 +1694,6 @@ void CPUDump::yaraSlot()
16961694
}
16971695
}
16981696

1699-
void CPUDump::entropySlot()
1700-
{
1701-
dsint selStart = getSelectionStart();
1702-
dsint selSize = getSelectionEnd() - selStart + 1;
1703-
QVector<byte_t> data;
1704-
data.resize(selSize);
1705-
mMemPage->read(data.data(), selStart, selSize);
1706-
1707-
EntropyDialog entropyDialog(this);
1708-
entropyDialog.setWindowTitle(tr("Entropy (Address: %1, Size: %2)").arg(ToPtrString(rvaToVa(selStart))).arg(ToHexString(selSize)));
1709-
entropyDialog.show();
1710-
entropyDialog.GraphMemory(data.constData(), data.size());
1711-
entropyDialog.exec();
1712-
}
1713-
17141697
void CPUDump::syncWithExpressionSlot()
17151698
{
17161699
if(!DbgIsDebugging())

src/gui/Src/Gui/CPUDump.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ public slots:
106106

107107
void selectionUpdatedSlot();
108108
void yaraSlot();
109-
void entropySlot();
110109
void syncWithExpressionSlot();
111110
void followInDumpNSlot();
112111
void allocMemorySlot();

src/gui/Src/Gui/EntropyDialog.cpp

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/gui/Src/Gui/EntropyDialog.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/gui/Src/Gui/EntropyDialog.ui

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/gui/Src/Gui/MemoryMapView.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "Bridge.h"
77
#include "PageMemoryRights.h"
88
#include "YaraRuleSelectionDialog.h"
9-
#include "EntropyDialog.h"
109
#include "HexEditDialog.h"
1110
#include "MiscUtil.h"
1211
#include "GotoDialog.h"
@@ -160,12 +159,6 @@ void MemoryMapView::setupContextMenu()
160159
this->addAction(mGotoExpression);
161160
mGotoMenu->addAction(mGotoExpression);
162161

163-
//Entropy
164-
mEntropy = new QAction(DIcon("entropy.png"), tr("Entropy..."), this);
165-
mEntropy->setShortcutContext(Qt::WidgetShortcut);
166-
this->addAction(mEntropy);
167-
connect(mEntropy, SIGNAL(triggered()), this, SLOT(entropy()));
168-
169162
//Find
170163
mFindPattern = new QAction(DIcon("search-for.png"), tr("&Find Pattern..."), this);
171164
this->addAction(mFindPattern);
@@ -198,7 +191,6 @@ void MemoryMapView::refreshShortcutsSlot()
198191
mFindPattern->setShortcut(ConfigShortcut("ActionFindPattern"));
199192
mGotoOrigin->setShortcut(ConfigShortcut("ActionGotoOrigin"));
200193
mGotoExpression->setShortcut(ConfigShortcut("ActionGotoExpression"));
201-
mEntropy->setShortcut(ConfigShortcut("ActionEntropy"));
202194
mMemoryFree->setShortcut(ConfigShortcut("ActionFreeMemory"));
203195
mMemoryAllocate->setShortcut(ConfigShortcut("ActionAllocateMemory"));
204196
mYara->setShortcut(ConfigShortcut("ActionYara"));
@@ -215,7 +207,6 @@ void MemoryMapView::contextMenuSlot(const QPoint & pos)
215207
wMenu.addAction(mDumpMemory);
216208
wMenu.addAction(mComment);
217209
wMenu.addAction(mYara);
218-
wMenu.addAction(mEntropy);
219210
wMenu.addAction(mFindPattern);
220211
wMenu.addAction(mSwitchView);
221212
wMenu.addSeparator();
@@ -533,22 +524,6 @@ void MemoryMapView::switchView()
533524
stateChangedSlot(paused);
534525
}
535526

536-
void MemoryMapView::entropy()
537-
{
538-
duint addr = getCellContent(getInitialSelection(), 0).toULongLong(0, 16);
539-
duint size = getCellContent(getInitialSelection(), 1).toULongLong(0, 16);
540-
unsigned char* data = new unsigned char[size];
541-
DbgMemRead(addr, data, size);
542-
543-
EntropyDialog entropyDialog(this);
544-
entropyDialog.setWindowTitle(tr("Entropy (Address: %1, Size: %2)").arg(ToPtrString(addr).arg(ToPtrString(size))));
545-
entropyDialog.show();
546-
entropyDialog.GraphMemory(data, size);
547-
entropyDialog.exec();
548-
549-
delete[] data;
550-
}
551-
552527
void MemoryMapView::memoryAllocateSlot()
553528
{
554529
WordEditDialog mLineEdit(this);

src/gui/Src/Gui/MemoryMapView.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public slots:
3030
void switchView();
3131
void pageMemoryRights();
3232
void refreshMap();
33-
void entropy();
3433
void findPatternSlot();
3534
void dumpMemory();
3635
void commentSlot();
@@ -69,7 +68,6 @@ public slots:
6968
QAction* mMemoryExecuteRestore;
7069
QAction* mMemoryRemove;
7170
QAction* mMemoryExecuteSingleshootToggle;
72-
QAction* mEntropy;
7371
QAction* mFindPattern;
7472
QMenu* mGotoMenu;
7573
QAction* mGotoOrigin;

src/gui/Src/Gui/SymbolView.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "Configuration.h"
55
#include "Bridge.h"
66
#include "YaraRuleSelectionDialog.h"
7-
#include "EntropyDialog.h"
87
#include "BrowseDialog.h"
98
#include "StdSearchListView.h"
109
#include "ZehSymbolTable.h"
@@ -293,12 +292,6 @@ void SymbolView::setupContextMenu()
293292
mYaraFileAction = new QAction(DIcon("yara.png"), tr("&Yara File..."), this);
294293
connect(mYaraFileAction, SIGNAL(triggered()), this, SLOT(moduleYaraFile()));
295294

296-
mEntropyAction = new QAction(DIcon("entropy.png"), tr("Entropy..."), this);
297-
mEntropyAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
298-
this->addAction(mEntropyAction);
299-
mModuleList->addAction(mEntropyAction);
300-
connect(mEntropyAction, SIGNAL(triggered()), this, SLOT(moduleEntropy()));
301-
302295
mModSetUserAction = new QAction(DIcon("markasuser.png"), tr("Mark as &user module"), this);
303296
mModSetUserAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
304297
this->addAction(mModSetUserAction);
@@ -329,7 +322,6 @@ void SymbolView::refreshShortcutsSlot()
329322
mModSetUserAction->setShortcut(ConfigShortcut("ActionMarkAsUser"));
330323
mModSetSystemAction->setShortcut(ConfigShortcut("ActionMarkAsSystem"));
331324
mModSetPartyAction->setShortcut(ConfigShortcut("ActionMarkAsParty"));
332-
mEntropyAction->setShortcut(ConfigShortcut("ActionEntropy"));
333325
mBrowseInExplorer->setShortcut(ConfigShortcut("ActionBrowseInExplorer"));
334326
mDownloadSymbolsAction->setShortcut(ConfigShortcut("ActionDownloadSymbol"));
335327
mDownloadAllSymbolsAction->setShortcut(ConfigShortcut("ActionDownloadAllSymbol"));
@@ -533,7 +525,6 @@ void SymbolView::moduleContextMenu(QMenu* wMenu)
533525
wMenu->addAction(mFreeLib);
534526
wMenu->addAction(mYaraAction);
535527
wMenu->addAction(mYaraFileAction);
536-
wMenu->addAction(mEntropyAction);
537528
wMenu->addSeparator();
538529
int party = DbgFunctions()->ModGetParty(modbase);
539530
if(party != 0)
@@ -713,20 +704,6 @@ void SymbolView::toggleBookmark()
713704
GuiUpdateAllViews();
714705
}
715706

716-
void SymbolView::moduleEntropy()
717-
{
718-
duint modbase = DbgValFromString(mModuleList->mCurList->getCellContent(mModuleList->mCurList->getInitialSelection(), 0).toUtf8().constData());
719-
char szModPath[MAX_PATH] = "";
720-
if(DbgFunctions()->ModPathFromAddr(modbase, szModPath, _countof(szModPath)))
721-
{
722-
EntropyDialog entropyDialog(this);
723-
entropyDialog.setWindowTitle(tr("Entropy (%1)").arg(mModuleList->mCurList->getCellContent(mModuleList->mCurList->getInitialSelection(), 1)));
724-
entropyDialog.show();
725-
entropyDialog.GraphFile(QString(szModPath));
726-
entropyDialog.exec();
727-
}
728-
}
729-
730707
void SymbolView::moduleSetSystem()
731708
{
732709
int i = mModuleList->mCurList->getInitialSelection();

src/gui/Src/Gui/SymbolView.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ private slots:
5757
void toggleBreakpoint();
5858
void toggleBookmark();
5959
void refreshShortcutsSlot();
60-
void moduleEntropy();
6160
void emptySearchResultSlot();
6261
void selectionGetSlot(SELECTIONDATA* selection);
6362
void moduleLoad();
@@ -87,7 +86,6 @@ private slots:
8786
QAction* mCopyPathAction;
8887
QAction* mYaraAction;
8988
QAction* mYaraFileAction;
90-
QAction* mEntropyAction;
9189
QAction* mModSetUserAction;
9290
QAction* mModSetSystemAction;
9391
QAction* mModSetPartyAction;

src/gui/Src/QEntropyView/Entropy.h

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)