mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
ui: show x64 and dotnet
This commit is contained in:
@@ -74,7 +74,11 @@
|
||||
>
|
||||
{{exe}}</option>
|
||||
{% endfor %}
|
||||
|
||||
</select>
|
||||
|
||||
Is x64: {{ is_64}} <br>
|
||||
Is Dotnet: {{ is_dotnet}}
|
||||
</div>
|
||||
|
||||
<!-- row 3 -->
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user