ui: show x64 and dotnet

This commit is contained in:
Dobin
2024-04-01 20:12:08 +01:00
parent 5d8a1ec64f
commit 8468f3fef1
3 changed files with 24 additions and 2 deletions
+4
View File
@@ -74,7 +74,11 @@
>
{{exe}}</option>
{% endfor %}
</select>
Is x64: {{ is_64}} <br>
Is Dotnet: {{ is_dotnet}}
</div>
<!-- row 3 -->
+7 -2
View File
@@ -20,6 +20,7 @@ from sender import scannerDetectsBytes
from phases.injector import verify_injected_exe
from helper import run_process_checkret
from model.project import prepare_project
from pe.superpe import SuperPe
logger = logging.getLogger("ViewsProjects")
@@ -47,9 +48,11 @@ def project(name):
if os.path.exists(exe_path):
is_built = True
superpe = SuperPe(project.settings.inject_exe_in)
is_64 = superpe.is_64()
is_dotnet = superpe.is_dotnet()
project_dir = os.path.dirname(os.path.abspath(project.settings.inject_exe_out))
log_files = get_logfiles(project.settings.main_dir)
exes = []
@@ -83,6 +86,8 @@ def project(name):
injectstyles=injectstyles,
log_files=log_files,
is_64=is_64,
is_dotnet=is_dotnet,
)
+13
View File
@@ -45,6 +45,19 @@ class SuperPe():
self.arch = self.getFileArch()
if self.arch == 'x64':
self.ptrSize = 8
def is_64(self) -> bool:
return self.arch == 'x64'
def is_dotnet(self) -> bool:
# DotNet or not
# https://stackoverflow.com/questions/45574925/is-there-a-way-to-check-if-an-exe-is-dot-net-with-python-pefile
entry = self.pe.OPTIONAL_HEADER.DATA_DIRECTORY[14]
if entry.VirtualAddress != 0 and entry.Size != 0:
return True
return False
def get_physical_address(self, virtual_address):