mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
ui: show some more important information and checks
This commit is contained in:
@@ -86,10 +86,18 @@
|
||||
|
||||
<!-- Row 3: exe and shellcode info -->
|
||||
<div class="col-2">
|
||||
x64: {{ is_64 }} / Dotnet: {{ is_dotnet}} <br>
|
||||
{% if is_64 %}
|
||||
x64: {{ is_64 }}
|
||||
{% else %}
|
||||
<span class="text-danger">x64: {{ is_64 }}</span>
|
||||
{% endif %}
|
||||
/ Dotnet: {{ is_dotnet}} <br>
|
||||
.text: {{ code_sect_size}} <br>
|
||||
.rodata: {{ data_sect_size}}
|
||||
(max: {{ data_sect_largest_gap_size}}) <br>
|
||||
{% if not has_rodata_section %}
|
||||
<span class="text-danger">No .rodata section</span> <br>
|
||||
{% endif %}
|
||||
|
||||
{% if unresolved_dlls|length > 0 %}
|
||||
<br>
|
||||
@@ -129,7 +137,6 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
+8
-2
@@ -19,8 +19,14 @@ def index():
|
||||
|
||||
@views.route("/exes/<exe_name>")
|
||||
def exe_view(exe_name):
|
||||
path = "{}/{}".format(PATH_EXES, exe_name)
|
||||
superpe = SuperPe(path)
|
||||
# TODO
|
||||
filepath = "{}{}".format(PATH_EXES, exe_name)
|
||||
if not os.path.exists(filepath):
|
||||
filepath = "{}{}".format(PATH_EXES_MORE, exe_name)
|
||||
if not os.path.exists(filepath):
|
||||
return "File not found: {}".format(exe_name)
|
||||
|
||||
superpe = SuperPe(filepath)
|
||||
|
||||
return render_template('exe.html',
|
||||
superpe=superpe,
|
||||
|
||||
+15
-4
@@ -71,15 +71,25 @@ def project(name):
|
||||
# when we selected an input file
|
||||
if project.settings.inject_exe_in != "" and os.path.exists(project.settings.inject_exe_in):
|
||||
superpe = SuperPe(project.settings.inject_exe_in)
|
||||
#if not superpe.is_64():
|
||||
# # return 500
|
||||
# return "Error: Binary {} is not 64bit".format(project.settings.inject_exe_in), 500
|
||||
|
||||
is_64 = superpe.is_64()
|
||||
is_dotnet = superpe.is_dotnet()
|
||||
if superpe.is_dll():
|
||||
exports = superpe.get_exports_full()
|
||||
code_sect_size = superpe.get_code_section().Misc_VirtualSize
|
||||
data_sect_size = superpe.get_section_by_name(".rdata").virt_size
|
||||
exehost = ExeHost(project.settings.inject_exe_in)
|
||||
exehost.init()
|
||||
data_sect_largest_gap_size = exehost.get_rdata_relocmanager().find_largest_gap()
|
||||
if superpe.get_section_by_name(".rdata") != None:
|
||||
data_sect_size = superpe.get_section_by_name(".rdata").virt_size
|
||||
else:
|
||||
logger.warn("No .rdata section found in {}".format(project.settings.inject_exe_in))
|
||||
|
||||
has_rodata_section = superpe.has_rodata_section()
|
||||
if has_rodata_section:
|
||||
exehost = ExeHost(project.settings.inject_exe_in)
|
||||
exehost.init()
|
||||
data_sect_largest_gap_size = exehost.get_rdata_relocmanager().find_largest_gap()
|
||||
unresolved_dlls = pe.dllresolver.unresolved_dlls(superpe)
|
||||
|
||||
|
||||
@@ -120,6 +130,7 @@ def project(name):
|
||||
data_sect_largest_gap_size=data_sect_largest_gap_size,
|
||||
payload_len=payload_len,
|
||||
unresolved_dlls=unresolved_dlls,
|
||||
has_rodata_section=has_rodata_section,
|
||||
|
||||
has_remote=has_remote,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user