From ab6823c7aa3db4e37d465c68200778a97845624e Mon Sep 17 00:00:00 2001 From: Dobin Date: Fri, 19 Apr 2024 21:02:16 +0100 Subject: [PATCH] feature: ui: sections in exes/ --- app/templates/exes.html | 46 ++++++++++++++++++++++++++++++++++++----- app/views.py | 16 +++++++++++++- 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/app/templates/exes.html b/app/templates/exes.html index af6ad7b..c9337f3 100644 --- a/app/templates/exes.html +++ b/app/templates/exes.html @@ -1,6 +1,42 @@ + + + + {% include 'header.html' %} + + + {% include 'navigation.html' %} + +
+ +

Exes

+ + + + + + + {% for exe in exes %} + + + + + {% endfor %} +
ExeSections
{{exe['name']}} + + + + + + + + {% for section in exe['sections'] %} + + + + + + + {% endfor %} +
nameraw sizevirt size diff
{{section['name']}}{{section['raw_size']}}{{section['virt_size']}}{{section['raw_size'] - section['virt_size']}}
+
- diff --git a/app/views.py b/app/views.py index 4c66894..e63f8a5 100644 --- a/app/views.py +++ b/app/views.py @@ -31,7 +31,21 @@ def exe_view(exe_name): def exes_view(): exes = [] for file in os.listdir(PATH_EXES): - exes.append(file) + if not file.endswith(".dll") and not file.endswith(".exe"): + continue + if '.verify' in file or '.test' in file: + continue + + superpe = SuperPe("{}/{}".format(PATH_EXES, file)) + + e = { + 'name': file, + #'exports': superpe.get_exports_full(), + #'iat': superpe.get_iat_entries(), + 'sections': superpe.pe_sections, + } + exes.append(e) + #break return render_template('exes.html', exes=exes)