mirror of
https://github.com/monoxgas/Koppeling
synced 2026-06-06 16:14:35 +00:00
Fix export sorting issue (pefile doesn't return them in order)
This commit is contained in:
+2
-2
@@ -78,8 +78,8 @@ def _clone_exports(tgt, ref, ref_path, new_section_name = '.rdata2'):
|
|||||||
|
|
||||||
exp_names = [
|
exp_names = [
|
||||||
ref_path.encode() + b'.' + e.name
|
ref_path.encode() + b'.' + e.name
|
||||||
if e.name else ref_path.encode() + b'.#' + str(e.ordinal).encode()
|
if e.name else ref_path.encode() + b'.#' + e.ordinal
|
||||||
for e in ref.DIRECTORY_ENTRY_EXPORT.symbols
|
for e in sorted(ref.DIRECTORY_ENTRY_EXPORT.symbols, key=lambda x: x.ordinal)
|
||||||
]
|
]
|
||||||
exp_names_blob = b'\x00'.join(exp_names) + b'\x00'
|
exp_names_blob = b'\x00'.join(exp_names) + b'\x00'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user