diff options
| author | Xusheng <xusheng@vector35.com> | 2026-03-04 17:04:53 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2026-03-05 12:59:40 +0800 |
| commit | 432e144beeccf1d9a2d9ed9e7d016384eed0bb32 (patch) | |
| tree | f963730f2b0b18cbc0620a755e6aad415228c2dc /examples/triage/view.cpp | |
| parent | 3520262824637979418554656607433424896809 (diff) | |
Parse and display PE resource information in triage view. Fix https://github.com/Vector35/binaryninja-api/issues/4052, fix https://github.com/Vector35/binaryninja-api/issues/5607
Diffstat (limited to 'examples/triage/view.cpp')
| -rw-r--r-- | examples/triage/view.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/triage/view.cpp b/examples/triage/view.cpp index 0e995ae2..67eb27aa 100644 --- a/examples/triage/view.cpp +++ b/examples/triage/view.cpp @@ -6,6 +6,7 @@ #include "entry.h" #include "imports.h" #include "exports.h" +#include "resources.h" #include "sections.h" #include "fileinfo.h" #include "librariesinfo.h" @@ -119,6 +120,19 @@ TriageView::TriageView(QWidget* parent, BinaryViewRef data) : QScrollArea(parent if (sectionsWidget->GetSections().size() == 0) sectionsGroup->hide(); + if (m_data->GetTypeName() == "PE") + { + auto resourcesMd = m_data->QueryMetadata("PEResources"); + if (resourcesMd && resourcesMd->IsArray() && !resourcesMd->GetArray().empty()) + { + QGroupBox* resourcesGroup = new QGroupBox("Resources", container); + QVBoxLayout* resourcesLayout = new QVBoxLayout(); + resourcesLayout->addWidget(new ResourcesWidget(resourcesGroup, this, m_data)); + resourcesGroup->setLayout(resourcesLayout); + layout->addWidget(resourcesGroup); + } + } + QGroupBox* analysisInfoGroup = new QGroupBox("Analysis Info", container); QVBoxLayout* analysisInfoLayout = new QVBoxLayout(); analysisInfoLayout->addWidget(new AnalysisInfoWidget(analysisInfoGroup, m_data)); |
