From de73d5452eb67375afe2e84ed7053a3c53dc5c8f Mon Sep 17 00:00:00 2001 From: Dobin Date: Wed, 3 Apr 2024 19:22:48 +0100 Subject: [PATCH] feature: show iat in web ui --- app/templates/exe.html | 12 ++++++++++++ app/templates/exes.html | 6 ++++++ app/views.py | 17 +++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 app/templates/exe.html create mode 100644 app/templates/exes.html diff --git a/app/templates/exe.html b/app/templates/exe.html new file mode 100644 index 0000000..4711589 --- /dev/null +++ b/app/templates/exe.html @@ -0,0 +1,12 @@ + +

IAT

+ +{% for dll in iat %} +

DLL: {{dll}}

+ +{% endfor %} + diff --git a/app/templates/exes.html b/app/templates/exes.html new file mode 100644 index 0000000..af6ad7b --- /dev/null +++ b/app/templates/exes.html @@ -0,0 +1,6 @@ + + diff --git a/app/views.py b/app/views.py index e4ce6a5..f6150e4 100644 --- a/app/views.py +++ b/app/views.py @@ -4,6 +4,7 @@ import os import logging from typing import List, Tuple +from pe.superpe import SuperPe from model.defs import * views = Blueprint('views', __name__) @@ -13,3 +14,19 @@ logger = logging.getLogger("Views") @views.route("/") def index(): return render_template('index.html') + + +@views.route("/exes/") +def exe_view(exe_name): + path = "{}/{}".format(PATH_EXES, exe_name) + superpe = SuperPe(path) + return render_template('exe.html', superpe=superpe, iat=superpe.get_iat_entries()) + + +@views.route("/exes") +def exes_view(): + exes = [] + for file in os.listdir(PATH_EXES): + exes.append(file) + return render_template('exes.html', exes=exes) +