Skip to content

Commit

Permalink
Fix: 2022-11-22
Browse files Browse the repository at this point in the history
  • Loading branch information
horsicq committed Nov 22, 2022
1 parent 529a4a7 commit 0c4b6f4
Show file tree
Hide file tree
Showing 59 changed files with 771 additions and 1,349 deletions.
1 change: 1 addition & 0 deletions Binary/binary_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum TYPE {
TYPE_MEMORYMAP,
TYPE_ENTROPY,
TYPE_HEURISTICSCAN,
TYPE_EXTRACTOR,
__TYPE_size
};
} // namespace SBINARY
Expand Down
14 changes: 10 additions & 4 deletions Binary/binarywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@

#include "ui_binarywidget.h"

BinaryWidget::BinaryWidget(QWidget *pParent)
: FormatWidget(pParent), ui(new Ui::BinaryWidget)
BinaryWidget::BinaryWidget(QWidget *pParent) : FormatWidget(pParent), ui(new Ui::BinaryWidget)
{
ui->setupUi(this);

initWidget();
}

BinaryWidget::BinaryWidget(QIODevice *pDevice, FW_DEF::OPTIONS options, QWidget *pParent)
: BinaryWidget(pParent)
BinaryWidget::BinaryWidget(QIODevice *pDevice, FW_DEF::OPTIONS options, QWidget *pParent) : BinaryWidget(pParent)
{
ui->setupUi(this);

Expand Down Expand Up @@ -83,6 +81,7 @@ void BinaryWidget::reload()
ui->treeWidgetNavi->addTopLevelItem(createNewItem(SBINARY::TYPE_MEMORYMAP, tr("Memory map")));
ui->treeWidgetNavi->addTopLevelItem(createNewItem(SBINARY::TYPE_ENTROPY, tr("Entropy")));
ui->treeWidgetNavi->addTopLevelItem(createNewItem(SBINARY::TYPE_HEURISTICSCAN, tr("Heuristic scan")));
ui->treeWidgetNavi->addTopLevelItem(createNewItem(SBINARY::TYPE_EXTRACTOR, tr("Extractor")));

ui->treeWidgetNavi->expandAll();

Expand Down Expand Up @@ -237,6 +236,13 @@ void BinaryWidget::reloadData()
if (!isInitPresent(sInit)) {
ui->widgetHeuristicScan->setData(getDevice(), true, binary.getFileType());
}
} else if (nType == SBINARY::TYPE_EXTRACTOR) {
if (!isInitPresent(sInit)) {
XExtractor::OPTIONS extractorOptions = XExtractor::getDefaultOptions();
extractorOptions.bMenu_Hex = true;

ui->widgetExtractor->setData(getDevice(), extractorOptions, true);
}
}

setReadonly(ui->checkBoxReadonly->isChecked());
Expand Down
Loading

0 comments on commit 0c4b6f4

Please sign in to comment.